/[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.18 by pw, Wed Feb 5 16:15:51 1997 UTC revision 1.19 by dtc, Mon Feb 10 23:24:21 1997 UTC
# Line 71  Line 71 
71  (def-math-rtn "atanh" 1)  (def-math-rtn "atanh" 1)
72    
73  ;;; Exponential and Logarithmic.  ;;; Exponential and Logarithmic.
74  #-x86(def-math-rtn "exp" 1)  #-x86 (def-math-rtn "exp" 1)
75  #-x86(def-math-rtn "log" 1)  #-x86 (def-math-rtn "log" 1)
76  #-x86(def-math-rtn "log10" 1)  #-x86 (def-math-rtn "log10" 1)
77  (def-math-rtn "pow" 2)  (def-math-rtn "pow" 2)
78  #-x86 (def-math-rtn "sqrt" 1)  #-x86 (def-math-rtn "sqrt" 1)
79  (def-math-rtn "hypot" 2)  (def-math-rtn "hypot" 2)
# Line 83  Line 83 
83  #+x86 ;; These are needed for use by byte-compiled files.  #+x86 ;; These are needed for use by byte-compiled files.
84  (progn  (progn
85    (defun %sin (x)    (defun %sin (x)
86      (declare (type double-float x)      (declare (double-float x)
87               (values double-float))               (values double-float))
88      (%sin x))      (%sin x))
89    (defun %sin-quick (x)    (defun %sin-quick (x)
# Line 91  Line 91 
91               (values double-float))               (values double-float))
92      (%sin-quick x))      (%sin-quick x))
93    (defun %cos (x)    (defun %cos (x)
94      (declare (type double-float x)      (declare (double-float x)
95               (values double-float))               (values double-float))
96      (%cos x))      (%cos x))
97    (defun %cos-quick (x)    (defun %cos-quick (x)
# Line 115  Line 115 
115               (values double-float))               (values double-float))
116      (%atan2 x y))      (%atan2 x y))
117    (defun %exp (x)    (defun %exp (x)
118      (declare (type double-float x)      (declare (double-float x)
119               (values double-float))               (values double-float))
120      (%exp x))      (%exp x))
121    (defun %log (x)    (defun %log (x)
122      (declare (type double-float x)      (declare (double-float x)
123               (values double-float))               (values double-float))
124      (%log x))      (%log x))
125    (defun %log10 (x)    (defun %log10 (x)
126      (declare (type double-float x)      (declare (double-float x)
127               (values double-float))               (values double-float))
128      (%log10 x))      (%log10 x))
   
129    #+nil ;; notyet    #+nil ;; notyet
130    (defun %pow (x y)    (defun %pow (x y)
131      (declare (type (double-float 0d0) x)      (declare (type (double-float 0d0) x)
132               (type double-float y)               (double-float y)
133               (values (double-float 0d0)))               (values (double-float 0d0)))
134      (%pow x y))      (%pow x y))
135    (defun %sqrt (x)    (defun %sqrt (x)
136      (declare (type double-float x)      (declare (double-float x)
137               (values double-float))               (values double-float))
138      (%sqrt x))      (%sqrt x))
139    (defun %scalbn (f ex)    (defun %scalbn (f ex)
140      (declare (type double-float f)      (declare (double-float f)
141               (type (signed-byte 32) ex)               (type (signed-byte 32) ex)
142               (values double-float))               (values double-float))
143      (%scalbn f ex))      (%scalbn f ex))
# Line 147  Line 146 
146               (values double-float))               (values double-float))
147      (%scalb f ex))      (%scalb f ex))
148    (defun %logb (x)    (defun %logb (x)
149       (declare (double-float x)      (declare (double-float x)
150               (values double-float))               (values double-float))
151       (%logb x))      (%logb x))
152    ) ; progn    ) ; progn
153    
154    
# Line 635  Line 634 
634  ;; instead of these Lisp versions.  These versions are probably good  ;; instead of these Lisp versions.  These versions are probably good
635  ;; enough, especially since they are portable.  ;; enough, especially since they are portable.
636    
637    (declaim (inline scalb))
638  (defun scalb (x n)  (defun scalb (x n)
639    "Compute 2^N * X without compute 2^N first (use properties of the    "Compute 2^N * X without compute 2^N first (use properties of the
640  underlying floating-point format"  underlying floating-point format"
641    (declare (type double-float x)    (declare (type double-float x)
642             (integer n))             (type double-float-exponent n))
643    (scale-float x n))    (scale-float x n))
644    
645  (defun logb (x)  (defun logb (x)

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.5