This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/57484] 'std::numeric_limits< T >::signaling_NaN()' signaling-bit is incorrect for x86 32-bit.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57484

--- Comment #4 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
(In reply to Charles L. Wilcox from comment #3)
> Signaling NaN for type "f" in hex is "7fe00000".

I agree, this one doesn't look right to me, because that looks indeed like a
valid qNaN bit pattern only.

> Quiet NaN for type "f" in hex is "7fc00000".

OK.

> Signaling NaN for type "d" in hex is "7ffc000000000000".

Similar problem here: Only a qNaN

> Quiet NaN for type "d" in hex is "7ff8000000000000".

OK.

> $ g++ -Wall -Wextra test-signaling-nan.cpp -m64

> Signaling NaN for type "f" in hex is "7fa00000".
> Quiet NaN for type "f" in hex is "7fc00000".
> Signaling NaN for type "d" in hex is "7ff4000000000000".
> Quiet NaN for type "d" in hex is "7ff8000000000000".

All OK.

> The resulting values on 32-bit vs. 64-bit are different, and I believe the
> 64-bit values are the correct ones.

I agree.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]