This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove machine-dependent rounding dependency from write overflow
authorDave Mitchell <davem@fdisolutions.com>
Tue, 2 Mar 2004 21:33:22 +0000 (21:33 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Tue, 2 Mar 2004 21:33:22 +0000 (21:33 +0000)
tests

p4raw-id: //depot/perl@22422

t/op/write.t

index 52ba517..ccecac3 100755 (executable)
@@ -16,20 +16,20 @@ sub swrite {
 
 my @NumTests = (
     # [ format, value1, expected1, value2, expected2, .... ]
-    [ '@###',           0,   '   0',         1, '   1',     9999.5, '####',
-               9999.4999,   '9999',    -999.5, '####',     1e+100, '####' ],
+    [ '@###',           0,   '   0',         1, '   1',     9999.6, '####',
+               9999.4999,   '9999',    -999.6, '####',     1e+100, '####' ],
 
-    [ '@0##',           0,   '0000',         1, '0001',     9999.5, '####',
-               -999.4999,   '-999',    -999.5, '####',     1e+100, '####' ],
+    [ '@0##',           0,   '0000',         1, '0001',     9999.6, '####',
+               -999.4999,   '-999',    -999.6, '####',     1e+100, '####' ],
 
     [ '^###',           0,   '   0',     undef, '    ' ],
 
     [ '^0##',           0,   '0000',     undef, '    ' ],
 
-    [ '@###.',          0,  '   0.',         1, '   1.',    9999.5, '#####',
-                9999.4999,  '9999.',    -999.5, '#####' ],
+    [ '@###.',          0,  '   0.',         1, '   1.',    9999.6, '#####',
+                9999.4999,  '9999.',    -999.6, '#####' ],
 
-    [ '@##.##',         0, '  0.00',         1, '  1.00',  999.995, '######',
+    [ '@##.##',         0, '  0.00',         1, '  1.00',  999.996, '######',
                 999.99499, '999.99',      -100, '######' ],
 
     [ '@0#.##',         0, '000.00',         1, '001.00',       10, '010.00',