summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@CS.UCLA.EDU>2008-10-24 22:52:22 -0700
committerJim Meyering <meyering@redhat.com>2008-10-25 10:59:07 +0200
commit461231f022bdb3ee392622d31dc475034adceeb2 (patch)
treef0709db8cd6e0177801ea7d32eaa9ae30ca9faf3 /tests
parentb705e9a9e71546f3da2d3f5f966363e62b74d057 (diff)
downloadcoreutils-461231f022bdb3ee392622d31dc475034adceeb2.tar.xz
seq: revert Solaris 8 work-around that caused x86 regression
* src/seq.c: Don't include <math.h>, <float.h>. (abs_rel_diff): Remove. (print_numbers): Test for equality, not for an epsilonish value. This reverts 4827dd27b0c655a685947aaa01426a5ecba179f3, aka v6.10-185-g4827dd2, which broke 'seq' on the x86; for example, it causes "seq 9223372036854775807 9223372036854775808" to incorrectly output 3 numbers instead of 2. It's better to punish obsolescent hosts that have incorrectly-working floating-point than to punish correctly-working hosts. * tests/misc/seq: Use 0.9000000000000, rather than 0.90000000000000000000, to avoid tickling a bug in Solaris 8 strtold, which converts "0.9" and "0.9000000000000" correctly, but incorrectly converts "0.90000000000000000000" to a smaller value.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/seq5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/misc/seq b/tests/misc/seq
index 8e76f42da..227132208 100755
--- a/tests/misc/seq
+++ b/tests/misc/seq
@@ -47,7 +47,10 @@ my @Tests =
{OUT_SUBST => 's,^-0\.0$,0.0,'},
],
['float-5', qw(0.8 1e-1 0.9), {OUT => [qw(0.8 0.9)]}],
- ['float-6', qw(0.8 0.1 0.90000000000000000000), {OUT => [qw(0.8 0.9)]}],
+ # Don't append lots of zeros to that 0.9000...; for example, changing the
+ # number to 0.90000000000000000000 tickles a bug in Solaris 8 strtold
+ # that would cause the test to fail.
+ ['float-6', qw(0.8 0.1 0.9000000000000), {OUT => [qw(0.8 0.9)]}],
['wid-1', qw(.8 1e-2 .81), {OUT => [qw(0.80 0.81)]}],
['wid-2', qw(.89999 1e-7 .8999901), {OUT => [qw(0.8999900 0.8999901)]}],