| tnew __isNaN (Scott Schwartz) - plan9port - [fork] Plan 9 from user space | |
| git clone git://src.adamsgaard.dk/plan9port | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit fdfecd686054be1aac715fb3b99669873df002bb | |
| parent 9d53e3b430e56c740924f02fbb2695ea3597e13e | |
| Author: rsc <devnull@localhost> | |
| Date: Fri, 6 Apr 2007 01:49:05 +0000 | |
| new __isNaN (Scott Schwartz) | |
| Diffstat: | |
| M src/lib9/fmt/nan64.c | 6 +----- | |
| 1 file changed, 1 insertion(+), 5 deletions(-) | |
| --- | |
| diff --git a/src/lib9/fmt/nan64.c b/src/lib9/fmt/nan64.c | |
| t@@ -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; | |
| t@@ -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 |