/[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.1 by pfdietz, Sat Aug 7 23:02:26 2004 UTC revision 1.2 by pfdietz, Thu Aug 26 02:24:37 2004 UTC
# Line 22  Line 22 
22  (deftest format.f.2  (deftest format.f.2
23    (let ((*print-readably* nil))    (let ((*print-readably* nil))
24      (loop      (loop
25       for x = (expt (random-from-seq #(10.s0 10.f0 10.d0 10.0l0))       for i = (random 4)
26         for type = (elt #(short-float single-float double-float long-float) i)
27         for x = (expt (coerce 10 type)
28                     (- (random 10.0s0) 3))                     (- (random 10.0s0) 3))
29       for s1 = (format nil "~f" x)       for s1 = (format nil "~f" x)
30       for s2 = (prin1-to-string x)       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))
31       repeat 1000       repeat 1000
32       when (and (<= 1/1000 x)       when (and (<= 1/1000 x)
33                 (< x 10000000)                 (< x 10000000)
# Line 36  Line 38 
38  (deftest format.f.3  (deftest format.f.3
39    (let ((*print-readably* nil))    (let ((*print-readably* nil))
40      (loop      (loop
41       for x = (- (expt (random-from-seq #(10.s0 10.f0 10.d0 10.0l0))       for i = (random 4)
42         for type = (elt #(short-float single-float double-float long-float) i)
43         for x = (- (expt (coerce 10 type)
44                        (- (random 10.0s0) 3)))                        (- (random 10.0s0) 3)))
45       for s1 = (format nil "~f" x)       for s1 = (format nil "~f" x)
46       for s2 = (prin1-to-string x)       for s2 = (let ((*read-default-float-format* type)) (prin1-to-string x))
47       repeat 1000       repeat 1000
48       when (and (>= -1/1000 x)       when (and (>= -1/1000 x)
49                 (> x -10000000)                 (> x -10000000)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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