bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strtod bugs


From: Eric Blake
Subject: Re: strtod bugs
Date: Mon, 31 Mar 2008 22:13:26 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 3/30/2008 4:03 PM:
| And just now, I tested cygwin with -O2, and got:
|
| ../../m4/tests/test-strtod.c:149: assertion failed
| ../../m4/tests/test-strtod.c:221: assertion failed
|
| which looks like rounding errors in computing 0.1.  On further thought,
| that particular failure is due to x86 registers having more precision than
| memory, such that .1 (register) != .1 (memory).  So I've also changed the
| test to use .5 instead of .1.

Wow - gnulib's version of strtod really IS inaccurate.  The buildbot is
still showing failures, since 5 * pow (10.0, -1) != 0.5.  Any suggestions
on how to make this test pass?  Would it be acceptable (for now) to just
check that the result is within 1 or 2 ULP of the correct answer?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfxtmUACgkQ84KuGfSFAYBAUgCfaZJ7hXAmglOQKKDeT+d5Xmp5
i60AoI4YlLSK7gvpmSbgBa0z54G6EpN3
=Ukdx
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]