Changeset 11308 for trunk/source/level1/l1numbers.lisp
 Timestamp:
 Nov 8, 2008, 1:48:36 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/source/level1/l1numbers.lisp
r11210 r11308 767 767 (progn 768 768 (defun %doublefloatasinh! (n result) 769 (%setfdoublefloat 770 result 771 (log (+ n (sqrt (1+ (* n n))))))) 769 (declare (doublefloat n result)) 770 (withstackdoublefloats ((temp)) 771 (%setfdoublefloat TEMP (externalcall "asinh" :doublefloat n :doublefloat)) 772 (%dfcheckexception1 'asinh n (%ffiexceptionstatus)) 773 (%setfdoublefloat result TEMP))) 772 774 773 775 #+32bittarget 774 776 (defun %singlefloatasinh! (n result) 775 (%setfshortfloat 776 result 777 (log (+ n (sqrt (1+ (* n n))))))) 777 (declare (singlefloat n result)) 778 (target::withstackshortfloats ((temp)) 779 (%setfshortfloat TEMP (externalcall "asinhf" :float n :float)) 780 (%sfcheckexception1 'asinh n (%ffiexceptionstatus)) 781 (%setfshortfloat result TEMP))) 778 782 779 783 #+64bittarget 780 784 (defun %singlefloatasinh (n) 781 (log (+ n (sqrt (1+ (* n n))))))) 785 (declare (singlefloat n)) 786 (let* ((result (externalcall "asinhf" :float n :float))) 787 (%sfcheckexception1 'asinh n (%ffiexceptionstatus)) 788 result))) 782 789 783 790 #windowstarget … … 810 817 (progn 811 818 (defun %doublefloatacosh! (n result) 812 (%setfdoublefloat 813 result 814 (* 2 (log (+ (sqrt (/ (+ n 1) 2)) (sqrt (/ ( n 1) 2))))))) 819 (declare (doublefloat n result)) 820 (withstackdoublefloats ((temp)) 821 (%setfdoublefloat TEMP (externalcall "acosh" :double n :double)) 822 (%dfcheckexception1 'acosh n (%ffiexceptionstatus)) 823 (%setfdoublefloat result TEMP))) 815 824 816 825 #+32bittarget 817 826 (defun %singlefloatacosh! (n result) 818 (%setfshortfloat 819 result 820 (* 2 (log (+ (sqrt (/ (+ n 1) 2)) (sqrt (/ ( n 1) 2))))))) 827 (declare (singlefloat n result)) 828 (target::withstackshortfloats ((temp)) 829 (%setfshortfloat TEMP (externalcall "acoshf" :float n :float)) 830 (%sfcheckexception1 'acosh n (%ffiexceptionstatus)) 831 (%setfshortfloat result TEMP))) 821 832 822 833 #+64bittarget 823 834 (defun %singlefloatacosh (n) 824 (* 2 (log (+ (sqrt (/ (+ n 1) 2)) (sqrt (/ ( n 1) 2)))))) 835 (declare (singlefloat n)) 836 (let* ((result (externalcall "acoshf" :float n :float))) 837 (%sfcheckexception1 'acosh n (%ffiexceptionstatus)) 838 result)) 825 839 826 840 ) … … 854 868 (progn 855 869 (defun %doublefloatatanh! (n result) 856 ( %setfdoublefloat857 result858 (/ ( (log (1+ n))859 (log ( 1 n)))860 2)))870 (declare (doublefloat n result)) 871 (withstackdoublefloats ((temp)) 872 (%setfdoublefloat TEMP (externalcall "atanh" :double n :double)) 873 (%dfcheckexception1 'atanh n (%ffiexceptionstatus)) 874 (%setfdoublefloat result TEMP))) 861 875 862 876 #+32bittarget 863 877 (defun %singlefloatatanh! (n result) 864 ( %setfshortfloat865 result866 (/ ( (log (1+ n))867 (log ( 1 n)))868 2)))878 (declare (singlefloat n result)) 879 (target::withstackshortfloats ((temp)) 880 (%setfshortfloat TEMP (externalcall "atanhf" :float n :float)) 881 (%sfcheckexception1 'atanh n (%ffiexceptionstatus)) 882 (%setfshortfloat result TEMP))) 869 883 870 884 #+64bittarget 871 885 (defun %singlefloatatanh (n) 872 (/ ( (log (1+ n)) 873 (log ( 1 n))) 874 2)) 886 (declare (singlefloat n)) 887 (let* ((result (externalcall "atanhf" :float n :float))) 888 (%sfcheckexception1 'atanh n (%ffiexceptionstatus)) 889 result)) 875 890 876 891 )
Note: See TracChangeset
for help on using the changeset viewer.