0.7.9.1:
[sbcl.git] / src / code / irrat.lisp
index 040bd05..9acba10 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)
 ;;; 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))
                           (float-sign y pi))
                       (float-sign y (/ pi 2)))
                   (%atan2 y x))))
-       (number-dispatch ((y number) (x number))
+       (number-dispatch ((y real) (x real))
          ((double-float
            (foreach double-float single-float fixnum bignum ratio))
           (atan2 y (coerce x 'double-float)))
        ((complex)
         (complex-atan y)))))
 
-;; It seems that everyone has a C version of sinh, cosh, and
-;; tanh. Let's use these for reals because the original
-;; implementations based on the definitions lose big in round-off
-;; error. These bad definitions also mean that sin and cos for
-;; complex numbers can also lose big.
+;;; It seems that every target system has a C version of sinh, cosh,
+;;; and tanh. Let's use these for reals because the original
+;;; implementations based on the definitions lose big in round-off
+;;; error. These bad definitions also mean that sin and cos for
+;;; complex numbers can also lose big.
 
 (defun sinh (number)
   #!+sb-doc
 ;;;;
 ;;;; The original CMU CL code requested:
 ;;;;   Please send any bug reports, comments, or improvements to
-;;;;   Raymond Toy at toy@rtp.ericsson.se.
+;;;;   Raymond Toy at <email address deleted during 2002 spam avalanche>.
 
 ;;; FIXME: In SBCL, the floating point infinity constants like
 ;;; SB!EXT:DOUBLE-FLOAT-POSITIVE-INFINITY aren't available as
              #-(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