[git] CMU Common Lisp branch rtoy-lisp-trig updated. snapshot-2013-12-a-6-g7069ef9

Raymond Toy rtoy at common-lisp.net
Sun Dec 15 05:38:43 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, rtoy-lisp-trig has been updated
       via  7069ef9dfa3770d7b3e00aac297ae7dcb22b8c20 (commit)
      from  7190b61cf97c8320d6a218c430471c0fb0bf518e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7069ef9dfa3770d7b3e00aac297ae7dcb22b8c20
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Sat Dec 14 21:38:18 2013 -0800

    Small cleanups.
    
     * Remove unneeded package specifier for %ieee754-rem-pi/2
     * Add some comments for %tan.

diff --git a/src/code/irrat.lisp b/src/code/irrat.lisp
index c23321d..6a025a1 100644
--- a/src/code/irrat.lisp
+++ b/src/code/irrat.lisp
@@ -543,7 +543,7 @@
       (t
        ;; Argument reduction needed
        (multiple-value-bind (n y0 y1)
-	   (kernel::%ieee754-rem-pi/2 x)
+	   (%ieee754-rem-pi/2 x)
 	 (case (logand n 3)
 	   (0
 	    (kernel-sin y0 y1 1))
@@ -568,7 +568,7 @@
       (t
        ;; Argument reduction needed
        (multiple-value-bind (n y0 y1)
-	   (kernel::%ieee754-rem-pi/2 x)
+	   (%ieee754-rem-pi/2 x)
 	 (ecase (logand n 3)
 	   (0
 	    (kernel-cos y0 y1))
@@ -584,16 +584,19 @@
 	   (optimize (speed 3)))
   (let ((ix (logand #x7fffffff (kernel:double-float-high-bits x))))
     (cond ((<= ix #x3fe921fb)
+	   ;; |x| < pi/4
 	   (kernel-tan x 0d0 1))
 	  ((>= ix #x7ff00000)
+	   ;; tan(Inf or Nan) is NaN
 	   (- x x))
 	  (t
 	   (multiple-value-bind (n y0 y1)
-	       (kernel::%ieee754-rem-pi/2 x)
+	       (%ieee754-rem-pi/2 x)
 	     (let ((flag (- 1 (ash (logand n 1) 1))))
 	       ;; flag = 1 if n even, -1 if n odd
 	       (kernel-tan y0 y1 flag)))))))
 
+;; Compute sin and cos of x, simultaneously.
 (defun %sincos (x)
   (declare (double-float x)
 	   (optimize (speed 3)))
@@ -617,7 +620,6 @@
 	     (3
 	      (values (- (kernel-cos y0 y1))
 		      (kernel-sin y0 y1 1))))))))
-      
 (declaim (ext:end-block))
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/code/irrat.lisp |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp



More information about the cmucl-cvs mailing list