diff options
author | rsc <devnull@localhost> | 2007-04-06 01:49:05 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2007-04-06 01:49:05 +0000 |
commit | fdfecd686054be1aac715fb3b99669873df002bb (patch) | |
tree | 2349d67189b337c110ce1a57cd93b41b26d3fe14 /src | |
parent | 9d53e3b430e56c740924f02fbb2695ea3597e13e (diff) | |
download | plan9port-fdfecd686054be1aac715fb3b99669873df002bb.tar.gz plan9port-fdfecd686054be1aac715fb3b99669873df002bb.tar.bz2 plan9port-fdfecd686054be1aac715fb3b99669873df002bb.zip |
new __isNaN (Scott Schwartz)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib9/fmt/nan64.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib9/fmt/nan64.c b/src/lib9/fmt/nan64.c index 6e355a20..8fad49eb 100644 --- a/src/lib9/fmt/nan64.c +++ b/src/lib9/fmt/nan64.c @@ -9,10 +9,6 @@ #include "fmt.h" #include "fmtdef.h" -#if defined (__APPLE__) || (__powerpc__) -#define _NEEDLL -#endif - static uvlong uvnan = ((uvlong)0x7FF00000<<32)|0x00000001; static uvlong uvinf = ((uvlong)0x7FF00000<<32)|0x00000000; static uvlong uvneginf = ((uvlong)0xFFF00000<<32)|0x00000000; @@ -35,7 +31,7 @@ __isNaN(double d) p = &d; x = *(uvlong*)p; - return (ulong)(x>>32)==0x7FF00000 && !__isInf(d, 0); + return (ulong)((x>>52)&0x7FF)==0x7FF && !__isInf(d, 0); } double |