[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strtod bugs
From: |
Bruno Haible |
Subject: |
Re: strtod bugs |
Date: |
Mon, 31 Mar 2008 23:50:45 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> 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)?
I don't think it's a bug. The spec
http://www.opengroup.org/susv3/functions/signbit.html
does not specify which non-zero return value is used. You don't even have
the guarantee that two different invocations of signbit(x) with the same x
will yield the same results.
Things would be different if the return value was 'bool'. But it's 'int'.
Bruno
- Re: strtod bugs, (continued)
- 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, 2008/03/31
- Re: strtod bugs,
Bruno Haible <=
- Re: strtod bugs, Jim Meyering, 2008/03/31
Re: strtod bugs, Bruno Haible, 2008/03/30
- Re: strtod bugs, Eric Blake, 2008/03/30
- Re: strtod bugs, Eric Blake, 2008/03/31
- Re: strtod bugs, Eric Blake, 2008/03/31
- Re: strtod bugs, Bruno Haible, 2008/03/31
- Re: strtod bugs, Eric Blake, 2008/03/31