[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
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'.


reply via email to

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