### Add dd-%sincos and use it as needed instead of calling sin and cos

`separately.`
parent 2e3e48d4
 ... ... @@ -1191,6 +1191,29 @@ pi/4 11001001000011111101101010100010001000010110100011000 010001101001100010 (dd-%%tan reduced) (- (/ (dd-%%tan reduced)))))))) (defun dd-%sincos (x) (declare (double-double-float x)) (cond ((< (abs x) (/ pi 4)) (values (dd-%%sin x) (dd-%%cos x))) (t ;; Argument reduction needed (multiple-value-bind (n reduced) (reduce-arg x) (case (logand n 3) (0 (values (dd-%%sin reduced) (dd-%%cos reduced))) (1 (values (dd-%%cos reduced) (- (dd-%%sin reduced)))) (2 (values (- (dd-%%sin reduced)) (- (dd-%%cos reduced)))) (3 (values (- (dd-%%cos reduced)) (dd-%%sin reduced)))))))) ;;; dd-%log2 ;;; Base 2 logarithm. ... ...
 ... ... @@ -1298,7 +1298,9 @@ (coerce s '(dispatch-type theta))))) #+double-double ((double-double-float) (complex (cos theta) (sin theta)))))) (multiple-value-bind (s c) (dd-%sincos theta) (complex c s)))))) (defun asin (number) "Return the arc sine of NUMBER." ... ...
 ... ... @@ -748,8 +748,9 @@ #+double-double (deftransform cis ((z) (double-double-float) *) ;; Cis. '(complex (cos z) (sin z))) `(multiple-value-bind (s c) (kernel::dd-%sincos x) (complex c s))) ;;; The argument range is limited on the x86 FP trig. functions. A ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!