/[gcl]/gcl/ansi-tests/format-f.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/format-f.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by pfdietz, Sun Aug 29 16:25:14 2004 UTC revision 1.4 by pfdietz, Sat Sep 11 12:34:13 2004 UTC
# Line 16  Line 16 
16                     short-float single-float double-float long-float)                     short-float single-float double-float long-float)
17       for x in '(0.0s0 0.0f0 0.0d0 0.0l0       for x in '(0.0s0 0.0f0 0.0d0 0.0l0
18                        -0.0s0 -0.0f0 -0.0d0 -0.0l0)                        -0.0s0 -0.0f0 -0.0d0 -0.0l0)
19       for s1 = (format nil "~f" x)       for s1 = (let ((*read-default-float-format* type)) (format nil "~f" x))
20       for s2 = (let ((*read-default-float-format* type))       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))
                 (prin1-to-string x))  
21       unless (string=t s1 s2)       unless (string=t s1 s2)
22       collect (list x type s1 s2)))       collect (list x type s1 s2)))
23    nil)    nil)
# Line 30  Line 29 
29       for type = (elt #(short-float single-float double-float long-float) i)       for type = (elt #(short-float single-float double-float long-float) i)
30       for x = (expt (coerce 10 type)       for x = (expt (coerce 10 type)
31                     (- (random 10.0s0) 3))                     (- (random 10.0s0) 3))
32       for s1 = (format nil "~f" x)       for s1 = (let ((*read-default-float-format* type)) (format nil "~f" x))
33       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))
34       repeat 1000       repeat 1000
35       when (and (<= 1/1000 x)       when (and (<= 1/1000 x)
# Line 46  Line 45 
45       for type = (elt #(short-float single-float double-float long-float) i)       for type = (elt #(short-float single-float double-float long-float) i)
46       for x = (- (expt (coerce 10 type)       for x = (- (expt (coerce 10 type)
47                        (- (random 10.0s0) 3)))                        (- (random 10.0s0) 3)))
48       for s1 = (format nil "~f" x)       for s1 = (let ((*read-default-float-format* type)) (format nil "~f" x))
49       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))
50       repeat 1000       repeat 1000
51       when (and (>= -1/1000 x)       when (and (>= -1/1000 x)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26