X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat.lisp;h=a8dd5f0f218633d26a0b25fe6c18eade83cd32ce;hb=a160917364f85b38dc0826a5e3dcef87e3c4c62c;hp=9e8ae74abc86da480aa4773d4f17ea34b2385327;hpb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;p=sbcl.git diff --git a/src/code/float.lisp b/src/code/float.lisp index 9e8ae74..a8dd5f0 100644 --- a/src/code/float.lisp +++ b/src/code/float.lisp @@ -75,19 +75,34 @@ (!define-float-dispatching-function float-nan-p "Return true if the float X is a NaN (Not a Number)." + #!-(or mips hppa) (not (zerop (ldb sb!vm:single-float-significand-byte bits))) + #!+(or mips hppa) + (zerop (logand (ldb sb!vm:single-float-significand-byte bits) + sb!vm:single-float-trapping-nan-bit)) + #!-(or mips hppa) (or (not (zerop (ldb sb!vm:double-float-significand-byte hi))) (not (zerop lo))) + #!+(or mips hppa) + (zerop (logand (ldb sb!vm:double-float-significand-byte hi) + sb!vm:double-float-trapping-nan-bit)) #!+(and long-float x86) (or (not (zerop (ldb sb!vm:long-float-significand-byte hi))) (not (zerop lo)))) (!define-float-dispatching-function float-trapping-nan-p "Return true if the float X is a trapping NaN (Not a Number)." + #!-(or mips hppa) (zerop (logand (ldb sb!vm:single-float-significand-byte bits) sb!vm:single-float-trapping-nan-bit)) + #!+(or mips hppa) + (not (zerop (ldb sb!vm:single-float-significand-byte bits))) + #!-(or mips hppa) (zerop (logand (ldb sb!vm:double-float-significand-byte hi) sb!vm:double-float-trapping-nan-bit)) + #!+(or mips hppa) + (or (not (zerop (ldb sb!vm:double-float-significand-byte hi))) + (not (zerop lo))) #!+(and long-float x86) (zerop (logand (ldb sb!vm:long-float-significand-byte hi) sb!vm:long-float-trapping-nan-bit)))