mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
another day, another __isNaN
This commit is contained in:
parent
fdfecd6860
commit
ada7ea055b
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,8 @@ __isNaN(double d)
|
|||
|
||||
p = &d;
|
||||
x = *(uvlong*)p;
|
||||
return (ulong)((x>>52)&0x7FF)==0x7FF && !__isInf(d, 0);
|
||||
/* IEEE 754: exponent bits 0x7FF and non-zero mantissa */
|
||||
return (x&uvinf) == uvinf && (x&~uvneginf) != 0;
|
||||
}
|
||||
|
||||
double
|
||||
|
|
Loading…
Reference in a new issue