bug-gnulib
[Top][All Lists]
Advanced

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

Re: strtod bugs


From: Jim Meyering
Subject: Re: strtod bugs
Date: Mon, 31 Mar 2008 21:28:59 +0200

Eric Blake <address@hidden> wrote:

> According to Jim Meyering on 3/31/2008 11:24 AM:
> |
> | Actually, strtod is doing the right thing: it produces -0,
> | with both the libc version and the gnulib-supplied function.
> |
> | 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, so your patch looks correct.  However,
>
> | +    ASSERT (!!signbit (result) == !!signbit (-(double)0.0)); /* IRIX 6.5 */
>
> Any reason you added the cast to double here?

Oh!  I knew there was something else to remove.
I added that when debugging.  Will remove.  Thanks!




reply via email to

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