/[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.15 by ram, Mon Oct 31 04:11:27 1994 UTC revision 1.16 by ram, Mon Jul 8 19:17:28 1996 UTC
# Line 366  Line 366 
366    
367  (defun acosh (number)  (defun acosh (number)
368    "Return the hyperbolic arc cosine of NUMBER."    "Return the hyperbolic arc cosine of NUMBER."
369    (log (+ number (* (1+ number) (sqrt (/ (1- number) (1+ number)))))))    (* 2 (log (+ (sqrt (/ (1+ number) 2)) (sqrt (/ (1- number) 2))))))
370    
371  (defun atanh (number)  (defun atanh (number)
372    "Return the hyperbolic arc tangent of NUMBER."    "Return the hyperbolic arc tangent of NUMBER."
373    (log (* (1+ number) (sqrt (/ (- 1 (* number number)))))))    (/ (- (log (1+ number)) (log (- 1 number))) 2))
374    
375    
376  ;;; HP-UX does not supply C versions of asinh, acosh, and atanh, so just  ;;; HP-UX does not supply C versions of asinh, acosh, and atanh, so just
# Line 388  Line 388 
388    (declare (type double-float number)    (declare (type double-float number)
389             (values double-float)             (values double-float)
390             (optimize (speed 3) (safety 0) (inhibit-warnings 3)))             (optimize (speed 3) (safety 0) (inhibit-warnings 3)))
391    (log (+ number    (* 2 (log (+ (the double-float (sqrt (/ (1+ number) 2)))
392            (* (1+ number)                 (the double-float (sqrt (/ (1- number) 2)))))))
              (the double-float (sqrt (/ (1- number) (1+ number))))))))  
393    
394  #+hpux  #+hpux
395  (defun %atanh (number)  (defun %atanh (number)
396    (declare (type double-float number)    (declare (type double-float number)
397             (values double-float)             (values double-float)
398             (optimize (speed 3) (safety 0) (inhibit-warnings 3)))             (optimize (speed 3) (safety 0) (inhibit-warnings 3)))
399    (log (* (1+ number) (the double-float (sqrt (/ (- 1 (* number number))))))))    (/ (- (log (1+ number)) (log (- 1 number))) 2))

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.5