[Top][All Lists]
[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 13:27:54 -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/31/2008 1:22 PM:
| | The trouble is that signbit(result) returns INT_MIN,
| | while signbit(-0.0) returns 1. Both seem to be allowed, so
| | how about this change? It solves the problem for me.
|
| Good catch. Yes, signbit is allowed to return any non-zero value when the
| argument is negative,
Independent of your patch, should we raise this as a gcc bug, that when it
does constant-folding optimization of signbit at compile-time
(signbit(-0.0) => 1), it results in a different value than when the macro
is used on a runtime value (signbit(result) => mask off all but the sign bit)?
- --
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
iEYEARECAAYFAkfxOzoACgkQ84KuGfSFAYDN0wCgu5Opy/M8E6DmKh1vkuH3lQP8
k/wAn2K9+Uw2KrpRkGJ6g3qLCwSx/grf
=MuSE
-----END PGP SIGNATURE-----
- Re: strtod bugs, (continued)
- Re: strtod bugs, Eric Blake, 2008/03/29
- Re: strtod bugs, Jim Meyering, 2008/03/30
- Re: strtod bugs, Jim Meyering, 2008/03/30
- Re: strtod bugs, Eric Blake, 2008/03/30
- Re: strtod bugs, Jim Meyering, 2008/03/30
- Re: strtod bugs, Eric Blake, 2008/03/30
- Re: strtod bugs, Eric Blake, 2008/03/30
- Re: strtod bugs, Jim Meyering, 2008/03/31
- Re: strtod bugs, Eric Blake, 2008/03/31
- Re: strtod bugs,
Eric Blake <=
- Re: strtod bugs, Bruno Haible, 2008/03/31
- Re: strtod bugs, Jim Meyering, 2008/03/31
Re: strtod bugs, Bruno Haible, 2008/03/30