Changeset 15705
 Timestamp:
 Feb 13, 2013, 8:29:08 AM (7 years ago)
 Location:
 trunk/source
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/source/level0/l0float.lisp
r15683 r15705 745 745 (tx2 (* tx tx)) 746 746 (d (1+ (* tx2 (* ty ty)))) 747 (n (if (> (abs i) 20) 748 (* 4 (exp (* 2 (abs i)))) 749 (let ((c (cosh i))) 750 (/ (* c c)))))) 751 (complex (/ (* n tx) d) 747 (c (if (> (abs i) 20) 748 (* 2 (exp ( (abs i)))) 749 (/ (cosh i))))) 750 (complex (/ (* (* c c) tx) d) 752 751 (/ (* ty (1+ tx2)) d)))))) 753 752 ((or (typep x 'ratio) … … 849 848 (t (if (minusp y) #.( singlefloathalfpi) singlefloathalfpi))))) 850 849 ((= x 1) 851 (setq ra (if (< y1 1e9) 852 (/ (loge (/ 2 y1)) 2) 853 (/ (log1+ (/ 4 (* y y))) 4))) 854 (setq ia (/ (atan (/ 2 y) 1) 2))) 855 (t 850 (cond ((< y1 1e9) 851 (setq ra (/ ( (if (typep y 'doublefloat) doublefloatlog2 singlefloatlog2) 852 (loge y1)) 853 2)) 854 (setq ia (/ (if (minusp y) (atan 2 y) (atan 2 ( y))) 2))) 855 (t 856 (setq ra (/ (log1+ (/ 4 (* y y))) 4)) 857 (setq ia (/ (atan (/ 2 y) 1) 2))))) 858 ((and (< y1 1) 859 (< 0.5 x 2)) 860 (let ((x1 ( x 1)) 861 (x+1 (+ x 1)) 862 (y2 (* y y))) 863 (setq ra (/ (loge (/ (+ (* x1 x1) y2) (+ (* x+1 x+1) y2))) 4)) 864 (setq ia (/ (atan (* 2 y) ( 1 (+ (* x x) y2))) 2)))) 865 (t 856 866 (let ((r2 (+ (* x x) (* y y)))) 857 867 (setq ra (/ (log1+ (/ (* 4 x) (1+ (+ (* 2 x) r2)))) 4)) … … 1116 1126 (doublefloat (%doublefloatexp! x (%makedfloat))) 1117 1127 (t 1118 #+32bittarget 1119 (target::withstackshortfloats ((sx x)) 1120 (%singlefloatexp! sx (%makesfloat))) 1121 #+64bittarget 1122 (%singlefloatexp (%shortfloat x))))) 1128 (if (and (typep x 'rational) 1129 (< x 104)) 1130 0.0s0 1131 #+32bittarget 1132 (target::withstackshortfloats ((sx x)) 1133 (%singlefloatexp! sx (%makesfloat))) 1134 #+64bittarget 1135 (%singlefloatexp (%shortfloat x)))))) 1123 1136 1124 1137 
trunk/source/level0/l0numbers.lisp
r15683 r15705 955 955 0.0f0)) 956 956 (doublefloat 957 (if ( minuspnumber)957 (if (%doublefloatsign number) 958 958 (%doublefloat pi) 959 959 0.0d0)) … … 961 961 (atan (%imagpart number) (%realpart number))) 962 962 (shortfloat 963 (if ( minuspnumber)963 (if (%shortfloatsign number) 964 964 (%shortfloat pi) 965 965 0.0s0)))) 
trunk/source/lib/numbers.lisp
r15683 r15705 727 727 (ty2 (* ty ty)) 728 728 (d (1+ (* (* tx tx) ty2))) 729 (n (if (> (abs r) 20) 730 (* 4 (exp ( (* 2 (abs r))))) 731 (let ((c (cosh r))) 732 (/ (* c c)))))) 729 (c (if (> (abs r) 20) 730 (* 2 (exp ( (abs r)))) 731 (/ (cosh r))))) 733 732 (complex (/ (* tx (1+ ty2)) d) 734 (/ (* nty) d))))))733 (/ (* (* c c) ty) d)))))) 735 734 ((typep x 'doublefloat) 736 735 (%doublefloattanh! x (%makedfloat)))
Note: See TracChangeset
for help on using the changeset viewer.