Created attachment 29791 [details] snan.c On PowerPC, in versions of GCC up to at least 4.7.2, a type cast -- which is a IEEE 754-2008 general-computational convertFormat operation (IEEE 754-2008, 5.4.2) -- does not turn a sNaN into a qNaN (whilst raising an INVALID exception), which is contrary to IEEE 754-2008 5.1 and 7.2. See the attached snan.c, for which I get for powerpc-linux-gnu-gcc -m64 (additionally specifying -fsignaling-nans doesn't make a difference): 7ff40000 0 0 0 7ff40000 0 7ff40000 0 7fe00000 7fa00000 The second like should have been: 7ffc0000 0 (or similar; top-most fraction bit (0x0008000) set). See also the discussion in <http://news.gmane.org/find-root.php?message_id=%3c5151E427.1080106%40linux.vnet.ibm.com%3e> and thereabouts, and the SNAN_TESTS_TYPE_CAST usage in glibc commit 572676160d5639edc0ecb663147bd291841458d1, <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=572676160d5639edc0ecb663147bd291841458d1>.
long double on PPC is not exactly IEEE.
The default IBM extended precision long double type on Power does not conform to the IEEE specification, so there is no expectation that this type coercions would comply with the IEEE 754-2008 standard.