X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat.lisp;h=bb60ed5607e0852d07f090a95f279b75c9847d26;hb=90ca09b75fbc3b63b2f7d09c67b04b866dd783f6;hp=51a621e3fb06b911852cadb0e1c46c10a3a23471;hpb=667ec9d494530079bef28e8589dd0d3274b935ec;p=sbcl.git diff --git a/src/code/float.lisp b/src/code/float.lisp index 51a621e..bb60ed5 100644 --- a/src/code/float.lisp +++ b/src/code/float.lisp @@ -120,8 +120,8 @@ ;;; We don't want to do these DEFCONSTANTs at cross-compilation time, ;;; because the cross-compilation host might not support floating -;;; point infinities. Putting them inside a LET remove -;;; top-level-formness, so that any EVAL-WHEN trickiness in the +;;; point infinities. Putting them inside a LET removes +;;; toplevel-formness, so that any EVAL-WHEN trickiness in the ;;; DEFCONSTANT forms is suppressed. (let () (defconstant single-float-positive-infinity @@ -864,19 +864,19 @@ uninterruptibly frob the rounding modes & do ieee round-to-integer. (exp (ldb sb!vm:double-float-exponent-byte hi-bits)) (frac (logior (ldb sb!vm:double-float-significand-byte hi-bits) sb!vm:double-float-hidden-bit)) - (shift (- exp (- sb!vm:double-float-digits sb!vm:word-bits) + (shift (- exp (- sb!vm:double-float-digits sb!vm:n-word-bits) sb!vm:double-float-bias))) (when (> exp sb!vm:double-float-normal-exponent-max) (error 'floating-point-invalid-operation :operator 'truncate :operands (list x))) - (if (<= shift (- sb!vm:word-bits sb!vm:double-float-digits)) + (if (<= shift (- sb!vm:n-word-bits sb!vm:double-float-digits)) 0 (let* ((res-hi (ash frac shift)) (res (if (plusp shift) (logior res-hi (the fixnum (ash (double-float-low-bits x) - (- shift sb!vm:word-bits)))) + (- shift sb!vm:n-word-bits)))) res-hi))) (declare (type (unsigned-byte 31) res-hi res)) (if (minusp hi-bits)