0.7.3.22:
[sbcl.git] / src / code / irrat.lisp
index 6d86938..98b118c 100644 (file)
@@ -25,7 +25,7 @@
   (let ((function (symbolicate "%" (string-upcase name))))
     `(progn
        (proclaim '(inline ,function))
-       (sb!alien:def-alien-routine (,name ,function) double-float
+       (sb!alien:define-alien-routine (,name ,function) double-float
          ,@(let ((results nil))
              (dotimes (i num-args (nreverse results))
                (push (list (intern (format nil "ARG-~D" i))
@@ -41,8 +41,9 @@
 ) ; EVAL-WHEN
 \f
 ;;;; stubs for the Unix math library
-
-;;; Please refer to the Unix man pages for details about these routines.
+;;;;
+;;;; Many of these are unnecessary on the X86 because they're built
+;;;; into the FPU.
 
 ;;; trigonometric
 #!-x86 (def-math-rtn "sin" 1)
 #!-x86 (def-math-rtn "sqrt" 1)
 (def-math-rtn "hypot" 2)
 #!-(or hpux x86) (def-math-rtn "log1p" 1)
-
-#!+x86 ;; These are needed for use by byte-compiled files.
-(progn
-  (defun %sin (x)
-    (declare (double-float x)
-            (values double-float))
-    (%sin x))
-  (defun %sin-quick (x)
-    (declare (double-float x)
-            (values double-float))
-    (%sin-quick x))
-  (defun %cos (x)
-    (declare (double-float x)
-            (values double-float))
-    (%cos x))
-  (defun %cos-quick (x)
-    (declare (double-float x)
-            (values double-float))
-    (%cos-quick x))
-  (defun %tan (x)
-    (declare (double-float x)
-            (values double-float))
-    (%tan x))
-  (defun %tan-quick (x)
-    (declare (double-float x)
-            (values double-float))
-    (%tan-quick x))
-  (defun %atan (x)
-    (declare (double-float x)
-            (values double-float))
-    (%atan x))
-  (defun %atan2 (x y)
-    (declare (double-float x y)
-            (values double-float))
-    (%atan2 x y))
-  (defun %exp (x)
-    (declare (double-float x)
-            (values double-float))
-    (%exp x))
-  (defun %log (x)
-    (declare (double-float x)
-            (values double-float))
-    (%log x))
-  (defun %log10 (x)
-    (declare (double-float x)
-            (values double-float))
-    (%log10 x))
-  #+nil ;; notyet
-  (defun %pow (x y)
-    (declare (type (double-float 0d0) x)
-            (double-float y)
-            (values (double-float 0d0)))
-    (%pow x y))
-  (defun %sqrt (x)
-    (declare (double-float x)
-            (values double-float))
-    (%sqrt x))
-  (defun %scalbn (f ex)
-    (declare (double-float f)
-            (type (signed-byte 32) ex)
-            (values double-float))
-    (%scalbn f ex))
-  (defun %scalb (f ex)
-    (declare (double-float f ex)
-            (values double-float))
-    (%scalb f ex))
-  (defun %logb (x)
-    (declare (double-float x)
-            (values double-float))
-    (%logb x))
-  (defun %log1p (x)
-    (declare (double-float x)
-            (values double-float))
-    (%log1p x))
-  ) ; progn
 \f
 ;;;; power functions
 
 ;;; from the general complex case.
 (defun expt (base power)
   #!+sb-doc
-  "Returns BASE raised to the POWER."
+  "Return BASE raised to the POWER."
   (if (zerop power)
       (1+ (* base power))
     (labels (;; determine if the double float is an integer.
 
 (defun abs (number)
   #!+sb-doc
-  "Returns the absolute value of the number."
+  "Return the absolute value of the number."
   (number-dispatch ((number number))
     (((foreach single-float double-float fixnum rational))
      (abs number))
              #-(or linux hpux) #.(/ (asinh most-positive-double-float) 4d0)
              ;; This is more accurate under linux.
              #+(or linux hpux) #.(/ (+ (log 2.0d0)
-                                          (log most-positive-double-float)) 4d0))
+                                       (log most-positive-double-float))
+                                    4d0))
               (coerce-to-complex-type (float-sign x)
                                       (float-sign y) z))
          (t