/[cmucl]/src/code/irrat.lisp
ViewVC logotype

Diff of /src/code/irrat.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wlott, Tue Jul 31 17:22:14 1990 UTC revision 1.4 by ram, Thu Oct 18 02:56:15 1990 UTC
# Line 27  Line 27 
27    (let ((function (intern (concatenate 'simple-string    (let ((function (intern (concatenate 'simple-string
28                                         "%"                                         "%"
29                                         (string-upcase name)))))                                         (string-upcase name)))))
30      `(def-c-routine (,name ,function) (double-float)      `(progn
31         ,@(let ((results nil))         (proclaim '(maybe-inline ,function))
32             (dotimes (i num-args (nreverse results))         (export ',function)
33               (push (list (intern (format nil "ARG-~D" i))         (def-c-routine (,name ,function) (double-float)
34                           'double-float)           ,@(let ((results nil))
35                     results))))))               (dotimes (i num-args (nreverse results))
36                   (push (list (intern (format nil "ARG-~D" i))
37                               'double-float)
38                         results)))))))
39    
40  (eval-when (compile load eval)  (eval-when (compile load eval)
41    
# Line 78  Line 81 
81    
82  ;;;; Power functions.  ;;;; Power functions.
83    
84    ;;; Let the C stubs be opportunistically inline expanded.
85    ;;;
86    (proclaim '(optimize (space 0)))
87    
88  (defun exp (number)  (defun exp (number)
89    "Return e raised to the power NUMBER."    "Return e raised to the power NUMBER."
90    (number-dispatch ((number number))    (number-dispatch ((number number))
# Line 316  Line 323 
323    "Return the arc tangent of Y if X is omitted or Y/X if X is supplied."    "Return the arc tangent of Y if X is omitted or Y/X if X is supplied."
324    (if xp    (if xp
325        (if (and (zerop x) (zerop y))        (if (and (zerop x) (zerop y))
326            (multiple-value-bind            (if (plusp (float-sign (float x)))
327                (mag exp sign-x)                y
328                (integer-decode-float (float x))                (if (minusp (float-sign (float y)))
329              (declare (ignore mag exp))                    (- pi)
330              (if (plusp sign-x)                    pi))
                 y  
                 (multiple-value-bind  
                     (mag exp sign-y)  
                     (integer-decode-float (float y))  
                   (declare (ignore mag exp))  
                   (if (minusp sign-y)  
                       (- pi)  
                       pi))))  
331            (number-dispatch ((y real) (x real))            (number-dispatch ((y real) (x real))
332              (((foreach fixnum bignum ratio single-float)              (((foreach fixnum bignum ratio single-float)
333                (foreach fixnum bignum ratio single-float))                (foreach fixnum bignum ratio single-float))
# Line 376  Line 375 
375    "Return the hyperbolic arc tangent of NUMBER."    "Return the hyperbolic arc tangent of NUMBER."
376    (log (* (1+ number) (sqrt (/ (- 1 (* number number)))))))    (log (* (1+ number) (sqrt (/ (- 1 (* number number)))))))
377    
378    (proclaim '(optimize (space 1)))

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.5