X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat.lisp;h=14c1a790599dd4fe4bcde5729cebcaaf703c01d6;hb=1c91b0bc7eb814af6a8c58a99a83a024716138e8;hp=91bafe697353c24475ce6217c9d20a0dcac6398f;hpb=d8346491af87b66677657e4b934ddeae1e749250;p=sbcl.git diff --git a/src/code/float.lisp b/src/code/float.lisp index 91bafe6..14c1a79 100644 --- a/src/code/float.lisp +++ b/src/code/float.lisp @@ -45,7 +45,7 @@ (make-long-float (logior (ash sign 15) exp) (ldb (byte 32 32) sig) (ldb (byte 32 0) sig))) - + ) ; EVAL-WHEN ;;;; float parameters @@ -56,12 +56,12 @@ (defconstant least-negative-short-float least-negative-single-float) (defconstant least-positive-double-float (double-from-bits 0 0 1)) #!-long-float -(defconstant least-positive-long-float least-positive-double-float) +(defconstant least-positive-long-float (double-from-bits 0 0 1)) #!+(and long-float x86) (defconstant least-positive-long-float (long-from-bits 0 0 1)) (defconstant least-negative-double-float (double-from-bits 1 0 1)) #!-long-float -(defconstant least-negative-long-float least-negative-double-float) +(defconstant least-negative-long-float (double-from-bits 1 0 1)) #!+(and long-float x86) (defconstant least-negative-long-float (long-from-bits 1 0 1)) @@ -283,8 +283,8 @@ (defun float-sign (float1 &optional (float2 (float 1 float1))) #!+sb-doc "Return a floating-point number that has the same sign as - float1 and, if float2 is given, has the same absolute value - as float2." + FLOAT1 and, if FLOAT2 is given, has the same absolute value + as FLOAT2." (declare (float float1 float2)) (* (if (etypecase float1 (single-float (minusp (single-float-bits float1))) @@ -311,17 +311,10 @@ #!+long-float ((long-float) sb!vm:long-float-digits))) -(setf (fdefinition 'float-radix) - ;; FIXME: Python flushes unused variable X in CLAMBDA, then - ;; flushes unused reference to X in XEP together with type - ;; check. When this is fixed, rewrite this definition in an - ;; ordinary form. -- APD, 2002-10-21 - (lambda (x) - #!+sb-doc - "Return (as an integer) the radix b of its floating-point argument." - (unless (floatp x) - (error 'type-error :datum x :expected-type 'float)) - 2)) +(defun float-radix (x) + #!+sb-doc + "Return (as an integer) the radix b of its floating-point argument." + 2) ;;;; INTEGER-DECODE-FLOAT and DECODE-FLOAT