[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Broken isnan(3) and/or DQNAN on Tru64
From: |
Ludovic Courtès |
Subject: |
Re: Broken isnan(3) and/or DQNAN on Tru64 |
Date: |
Sun, 03 May 2009 01:18:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) |
Hello,
Bruno Haible <address@hidden> writes:
> I meant %08X instead of %04X. DQNAN therefore likely is
> FFF8000000000000
> which decomposes into
> sign = 1 (irrelevant for NaNs),
> exponent = 0x7FF (highest possible value)
> mantissa = 0x8000000000000
> and this is precisely the common encoding of a quiet NaN
> (see <http://en.wikipedia.org/wiki/Not_a_number>).
Right.
>> > What's the result when you compile it with cc?
>> > $ cc foo.c -lm
>> > $ ./a.out
>> > $ echo $?
>>
>> 1
>>
>> That's with "Compaq C V6.5-303 (dtk) on Compaq Tru64 UNIX V5.1B
>> (Rev. 2650)".
>>
>> Should we conclude that this is a GCC bug?
>
> Possibly. And what result do you get with "gcc -mieee" ?
It works (returns 1).
The GCC manual (info "(gcc) DEC Alpha Options") reads this:
`-mieee'
[...]
This option generates code fully IEEE compliant code [...]
The resulting code is less efficient but is able to correctly
support denormalized numbers and exceptional IEEE values such as
not-a-number and plus/minus infinity.
So people compiling with GCC on this platform should pass `-mieee'
(`configure' could add it automatically.)
Thanks for your help!
Ludo'.
- Broken isnan(3) and/or DQNAN on Tru64, Ludovic Courtès, 2009/05/01
- Re: Broken isnan(3) and/or DQNAN on Tru64, Bruno Haible, 2009/05/01
- Re: Broken isnan(3) and/or DQNAN on Tru64, Ludovic Courtès, 2009/05/02
- Re: Broken isnan(3) and/or DQNAN on Tru64, Bruno Haible, 2009/05/02
- Re: Broken isnan(3) and/or DQNAN on Tru64,
Ludovic Courtès <=
- Re: Broken isnan(3) and/or DQNAN on Tru64, Bruno Haible, 2009/05/02
- Re: Broken isnan(3) and/or DQNAN on Tru64, Ludovic Courtès, 2009/05/03
- Re: Broken isnan(3) and/or DQNAN on Tru64, Bruno Haible, 2009/05/03
- Re: Broken isnan(3) and/or DQNAN on Tru64, Ludovic Courtès, 2009/05/10