X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat.lisp;h=6f46ab23dd15ee3fa827576157a3fd1c2eb12d78;hb=f9aaac53a4a43ebae198f53079857acb2d628eb0;hp=91bafe697353c24475ce6217c9d20a0dcac6398f;hpb=d8346491af87b66677657e4b934ddeae1e749250;p=sbcl.git diff --git a/src/code/float.lisp b/src/code/float.lisp index 91bafe6..6f46ab2 100644 --- a/src/code/float.lisp +++ b/src/code/float.lisp @@ -45,23 +45,23 @@ (make-long-float (logior (ash sign 15) exp) (ldb (byte 32 32) sig) (ldb (byte 32 0) sig))) - + ) ; EVAL-WHEN ;;;; float parameters (defconstant least-positive-single-float (single-from-bits 0 0 1)) -(defconstant least-positive-short-float least-positive-single-float) +(defconstant least-positive-short-float (single-from-bits 0 0 1)) (defconstant least-negative-single-float (single-from-bits 1 0 1)) -(defconstant least-negative-short-float least-negative-single-float) +(defconstant least-negative-short-float (single-from-bits 1 0 1)) (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,11 @@ #!+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." + (declare (ignore x)) + 2) ;;;; INTEGER-DECODE-FLOAT and DECODE-FLOAT