(defmacro **long-float** (f e) `(scale-float (decode-float (%primitive float-long ,f)) ,e)) ;;; ;;; From perqinit. ;;; (defconstant most-positive-long-float (**LONG-FLOAT** 1 1024)) (defconstant least-positive-long-float (**long-float** 1 -1021)) (defconstant least-negative-long-float (**long-float** -1 -1021)) (defconstant most-negative-long-float (**long-float** -1 1024)) (defconstant long-float-epsilon (**long-float** 1 -52)) (defconstant long-float-negative-epsilon (**long-float** -1 -53)) (defconstant most-positive-double-float (**LONG-FLOAT** 1 1024)) (defconstant least-positive-double-float (**long-float** 1 -1021)) (defconstant least-negative-double-float (**long-float** -1 -1021)) (defconstant most-negative-double-float (**long-float** -1 1024)) (defconstant double-float-epsilon (**long-float** 1 -52)) (defconstant double-float-negative-epsilon (**long-float** -1 -53)) ;;; ;;; Constants used in spirrat. ;;; ;;; Some constants entered using **long-float** format for exactness. ;;; When things stabilize, this could be changed to real numbers, ;;; but I don't relish searching for the right thing to type. (defconstant %long-sin-max 1.0L30) ;Should change. (defconstant %long-expt-max 1.0l30) ;" (defconstant %long-expt-min 1.0l-30) ;" (defconstant %long-sin-epsilon (**long-float** 1 -25)) ;OK. I think. (defconstant %long-atan-epsilon (**long-float** 1 -25)) ;" (defconstant %long-e 2.71828182845904523536028747135266L0) ;(Defvar e 2.71828182845904523536028747135266L0) (defconstant pi 3.1415926535897932384l0) (defconstant %long-pi/2 1.57079632679489661923L0) (defconstant %long-pi/4 .78539816339744830962L0) (defconstant %long-float-one 1.0l0) (defconstant %long-half .5l0) (defconstant %long-float-half .5l0) (defconstant %long-float-zero 0.0l0) (defconstant %long-float-sixteenth (**long-float** 1 -3)) (defconstant %long-asin-eps (**long-float** 1 -26)) (defconstant %long-asin-p1 -.27368494524164255994L2) (defconstant %long-asin-p2 .57208227877891731407L2) (defconstant %long-asin-p3 -.39688862997504877339L2) (defconstant %long-asin-p4 .10152522233806463645L2) (defconstant %long-asin-p5 -.69674573447350646411L0) (defconstant %long-asin-q0 -.16421096714498560795L3) (defconstant %long-asin-q1 .41714430248260412556L3) (defconstant %long-asin-q2 -.38186303361750149284L3) (defconstant %long-asin-q3 .15095270841030604719L3) (defconstant %long-asin-q4 -.23823859153670238830L2) (defconstant %long-asin-q5 1.0l0) (defconstant %long-sin-c1 3.1416015625L0) (defconstant %long-sin-c2 -8.908910206761537356617L-6) (defconstant %long-sin-r1 -.16666666666666665052L0) (defconstant %long-sin-r2 .83333333333331650314L-2) (defconstant %long-sin-r3 -.19841269841201840457L-3) (defconstant %long-sin-r4 .27557319210152756119L-5) (defconstant %long-sin-r5 -.25052106798274584544L-7) (defconstant %long-sin-r6 .16058936490371589114L-9) (defconstant %long-sin-r7 -.76429178068910467734L-12) (defconstant %long-sin-r8 .27204790957888846175L-14) (defconstant %long-atan-2-sqrt3 0.26794919243112270647L0) (defconstant %long-atan-sqrt3 1.73205080756887729353L0) (defconstant %long-atan-p0 -.13688768894191926929L2) (defconstant %long-atan-p1 -.20505855195861651981L2) (defconstant %long-atan-p2 -.84946240351320683534L1) (defconstant %long-atan-p3 -.83758299368150059274L0) (defconstant %long-atan-q0 .41066306682575781263L2) (defconstant %long-atan-q1 .86157249597130242515L2) (defconstant %long-atan-q2 .59578349597130242515L2) (defconstant %long-atan-q3 .15024001160028576121L2) (defconstant %long-atan-q4 1.0l0) (defconstant %long-atan-vector '#(0.0l0 0.52359877559829887308L0 1.57079632679489661923L0 1.04719755119659774615L0)) (defconstant %long-sqrt-c1 .4173L0) (defconstant %long-sqrt-c2 .59016L0) (defconstant %long-sqrt-half .70710678118654752440l0) (defconstant %long-exp-c1 (**long-float** #o543 0)) (defconstant %long-exp-c2 -2.1219444005469058277L-4) (defconstant %long-exp-p0 0.249999999999999993L0) (defconstant %long-exp-p1 .694360001511792852L-2) (defconstant %long-exp-p2 .165203300268279130L-4) (defconstant %long-exp-q1 .555538666969001188L-1) (defconstant %long-exp-q2 .495862884905441294L-3) (defconstant %long-log-base2-e 1.4426950408889634074L0) (defconstant %long-log-a0 -.64124943423745581147l2) (defconstant %long-log-a1 .16383943563021534222l2) (defconstant %long-log-a2 -.78956112887491257267l0) (defconstant %long-log-b0 -.76949932108494879777l3) (defconstant %long-log-b1 .31203222091924532844l3) (defconstant %long-log-b2 -.35667977739034646171l2) (defconstant %long-log-c1 (**long-float** #o543 0)) (defconstant %long-log-c2 -2.121944400546905827679l-4) (defconstant %long-expt-A1 (make-array 17. :initial-contents (list 1.0l0 (**long-float** #o752225750522220662 0) (**long-float** #o725403067175644416 0) (**long-float** #o701463367302522470 0) (**long-float** #o656423746255323532 0) (**long-float** #o634222140521760440 0) (**long-float** #o612634520425240666 0) (**long-float** #o572042434765401414 0) (**long-float** #o552023631477473630 0) (**long-float** #o532540767244124122 0) (**long-float** #o513773265233052116 0) (**long-float** #o475724623011064104 0) (**long-float** #o460337602430667052 0) (**long-float** #o443417233472542160 0) (**long-float** #o427127017076521364 0) (**long-float** #o413253033174611036 0) (**long-float** #o4 0)))) (defconstant %long-expt-A2 (make-array 8. :initial-contents (list (**long-float** #o1026173472062 #o-65) ;-53. (**long-float** #o210406261124 #o-67) (**long-float** #o161742153016 #o-70) (**long-float** #o1537250402177 #o-65) (**long-float** #o543111401243 #o-66) (**long-float** #o326640442174 #o-67) (**long-float** #o633017655544 #o-66) (**long-float** #o612305622556 #o-66)))) (defconstant %long-expt-p1 .83333333333333211405L-1) (defconstant %long-expt-p2 .12500000000503799174L-1) (defconstant %long-expt-p3 .22321421285924258967L-2) (defconstant %long-expt-p4 .43445775672163119635L-3) (defconstant %long-expt-K .44269504088896340736L0) (defconstant %long-expt-q1 .69314718055994529629L0) (defconstant %long-expt-q2 .24022650695909537056L0) (defconstant %long-expt-q3 .55504108664085595326L-1) (defconstant %long-expt-q4 .96181290595172416964L-2) (defconstant %long-expt-q5 .13333541313585784703L-2) (defconstant %long-expt-q6 .15400290440989764601L-3) (defconstant %long-expt-q7 .14928852680595608186L-4) ;;; ;;; Used in the printer. ;;; (defconstant long-log10-of-2 0.3010299956639811952d0) ;For the transition. (defconstant %long-float-ten 1.0l1) (defconstant %long-float-one-tenth 1.0l-1) (defconstant %long-float1l-3 1.0l-3) (defconstant %long-float1l7 1.0l7) (defconstant %long-tan-max-x 105414357.0l0) (defconstant %long-2/pi .63661977236758134308l0) (defconstant %long-tan-c1 (**long-float** #o14442 1)) (defconstant %long-tan-c2 -4.454455103380768678308l-6) (defconstant %long-tan-eps (**long-float** 1 -27)) (defconstant %long-tan-p1 -.13338350006421960681l0) (defconstant %long-tan-p2 .34248878235890589960l-2) (defconstant %long-tan-p3 -.17861707342254426711L-4) (defconstant %long-tan-q0 1.0L0) (defconstant %long-tan-q1 -.46671683339755294240L0) (defconstant %long-tan-q2 .25663832289440112864L-1) (defconstant %long-tan-q3 -.31181531907010027307L-3) (defconstant %long-tan-q4 .49819433993786512270L-6)