bug-gnulib
[Top][All Lists]
Advanced

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

Re: isnanl returns true for 2 and 3 on x86 openbsd 3.9


From: Bruno Haible
Subject: Re: isnanl returns true for 2 and 3 on x86 openbsd 3.9
Date: Mon, 5 Nov 2007 13:06:52 +0100
User-agent: KMail/1.5.4

Hi Jim,

>   openbsd$ ./seq 4
>   1
>   nan
>   nan
>   4

Must be specific to OpenBSD/x86. I don't reproduce it on NetBSD 3.0/x86.

> I tracked this to printf-posix's use of isnanl.

Yes, that's quite obviously the isnanl-nolibm module (or the system's isnanl()
function or isnan() macro).

> That function from gnulib returns true for the long-double
> values of 2 and 3 (exponent is 0 in those cases, yet this
> code returns 1:
> 
>   if (exponent == 0)
>     return (m.word[1] >> 31);
> 
> I don't have time to investigate further now.
> Maybe tomorrow.

The exponent is apparently incorrectly determined. What are the values of
EXPBIT0_WORD, EXPBIT0_BIT, EXP_MASK? Is OpenBSD's 'long double' type
the x86 80-bit one, or just the same as a 'double'?

Bruno





reply via email to

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