Changeset 9825


Ignore:
Timestamp:
Jun 22, 2008, 10:51:33 PM (11 years ago)
Author:
gb
Message:

Provide naive implementations of things otherwise done via #_acosh/
#_atanh/#_asinh for Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/level-1/l1-numbers.lisp

    r8725 r9825  
    866866    result))
    867867
    868 #+win64-target
    869 (eval-when (:compile-toplevel)
    870   (warn "no #_asinh in win64 math lib"))
    871 
    872 #-win64-target
     868#+windows-target
    873869(progn
    874870(defun %double-float-asinh! (n result)
     871  (%setf-double-float
     872   result
     873   (log (+ n (sqrt (1+ (* n n)))))))
     874
     875#+32-bit-target
     876(defun %single-float-asinh! (n result)
     877  (%setf-short-float
     878   result
     879   (log (+ n (sqrt (1+ (* n n)))))))
     880
     881#+64-bit-target
     882(defun %single-float-asinh (n)
     883  (log (+ n (sqrt (1+ (* n n)))))))
     884
     885#-windows-target
     886(progn
     887(defun %double-float-asinh! (n result)
    875888  (declare (double-float n result))
    876889  (with-stack-double-floats ((temp))
     
    904917)
    905918
    906 #+win64-target
    907 (eval-when (:compile-toplevel)
    908   (warn "no #_acosh in win64 math lib"))
    909 
    910 
    911 #-win64-target
     919#+windows-target
    912920(progn
    913921(defun %double-float-acosh! (n result)
     922  (%setf-double-float
     923   result
     924   (* 2 (log (+ (sqrt (/ (+ n 1) 2)) (sqrt (/ (- n 1) 2)))))))
     925
     926#+32-bit-target
     927(defun %single-float-acosh! (n result)
     928  (%setf-short-float
     929   result
     930   (* 2 (log (+ (sqrt (/ (+ n 1) 2)) (sqrt (/ (- n 1) 2)))))))
     931
     932#+64-bit-target
     933(defun %single-float-acosh (n)
     934  (* 2 (log (+ (sqrt (/ (+ n 1) 2)) (sqrt (/ (- n 1) 2))))))
     935
     936)
     937
     938 
     939
     940
     941#-windows-target
     942(progn
     943(defun %double-float-acosh! (n result)
    914944  (declare (double-float n result))
    915945  (with-stack-double-floats ((temp))
     
    918948    (%setf-double-float result TEMP)))
    919949
    920 #+(and ppc32-target (not darwinppc-target))
     950#+(and 32-bit-target (not darwinppc-target))
    921951(defun %single-float-acosh! (n result)
    922952  (declare (single-float n result))
     
    926956    (%setf-short-float result TEMP)))
    927957
    928 #+(and ppc32-target darwinppc-target)
     958#+(and 32-bit-target darwinppc-target)
    929959(defun %single-float-acosh! (n result)
    930960  (declare (single-float n result))
     
    942972)
    943973
    944 #+win64-target
    945 (eval-when (:compile-toplevel)
    946   (warn "no #_atanh in win64 math lib"))
    947 
    948 #-win64-target
     974#+windows-target
     975(progn
     976(defun %double-float-atanh! (n result)
     977  (%setf-double-float
     978   result
     979   (/ (- (log (1+ n))
     980         (log (- 1 n)))
     981      2)))
     982
     983#+32-bit-target
     984(defun %single-float-atanh! (n result)
     985  (%setf-short-float
     986   result
     987   (/ (- (log (1+ n))
     988         (log (- 1 n)))
     989      2)))
     990
     991#+64-bit-target
     992(defun %single-float-atanh (n)
     993  (/ (- (log (1+ n))
     994        (log (- 1 n)))
     995     2))
     996
     997)
     998
     999#-windows-target
    9491000(progn
    9501001(defun %double-float-atanh! (n result)
Note: See TracChangeset for help on using the changeset viewer.