[oct-scm] [oct-git]OCT: A portable Lisp implementation for quad-double precision floats branch master updated. 3d2184f115538262f60b359249d76fb1c4c7048d
Raymond Toy
rtoy at common-lisp.net
Mon Mar 7 20:46:15 UTC 2011
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 "OCT: A portable Lisp implementation for quad-double precision floats".
The branch, master has been updated
via 3d2184f115538262f60b359249d76fb1c4c7048d (commit)
via 1e343ca0be49b9e56938a8063b4d2e679e338965 (commit)
via 935f7e0f335c1ba01a17c6c6c39e0421f5f62b50 (commit)
from 1421224af506145ab18f9f4b412f300c97c11751 (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 3d2184f115538262f60b359249d76fb1c4c7048d
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Mon Mar 7 14:59:00 2011 -0500
Support testing with Lisps without signed floating-point zeros.
CHECK-SIGN just returns T if Lisp thinks -0d0 and 0d0 are the same
number. This is only true if Lisp doesn't support signed zeroes.
diff --git a/rt-tests.lisp b/rt-tests.lisp
index b87100e..b9e5867 100644
--- a/rt-tests.lisp
+++ b/rt-tests.lisp
@@ -583,8 +583,11 @@
(let* ((z (funcall fun arg))
(x (realpart z))
(y (imagpart z)))
- (if (and (= (float-sign x) (float-sign (realpart expected)))
- (= (float-sign y) (float-sign (imagpart expected))))
+ ;; If the Lisp doesn't support signed zeroes, then this test
+ ;; should always pass.
+ (if (or (eql -0d0 0d0)
+ (and (= (float-sign x) (float-sign (realpart expected)))
+ (= (float-sign y) (float-sign (imagpart expected)))))
t
(list z expected fun arg))))
commit 1e343ca0be49b9e56938a8063b4d2e679e338965
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Mon Mar 7 14:50:44 2011 -0500
Fix issue with float-sign calling qfloat-sign.
If the optional arg to FLOAT-SIGN is not given, don't call qfloat-sign
with a second arg of NIL. This breaks things. Call qfloat-sign with
the same number of arguments as float-sign.
diff --git a/qd-methods.lisp b/qd-methods.lisp
index 205c9fe..037bcc3 100644
--- a/qd-methods.lisp
+++ b/qd-methods.lisp
@@ -717,6 +717,7 @@ underlying floating-point format"
(defmethod qfloat-sign ((a real) &optional (f (float 1 a)))
(cl:float-sign a f))
+
(defmethod qfloat-sign ((a qd-real) &optional f)
(if f
(make-instance 'qd-real
@@ -725,8 +726,10 @@ underlying floating-point format"
(make-instance 'qd-real :value (make-qd-d (cl:float-sign (qd-0 (qd-value a)))))))
(declaim (inline float-sign))
-(defun float-sign (n &optional float2)
- (qfloat-sign n float2))
+(defun float-sign (n &optional (float2 nil float2p))
+ (if float2p
+ (qfloat-sign n float2)
+ (qfloat-sign n)))
(defun max (number &rest more-numbers)
"Returns the greatest of its arguments."
commit 935f7e0f335c1ba01a17c6c6c39e0421f5f62b50
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Mon Mar 7 14:47:00 2011 -0500
Ignore *.fas files.
diff --git a/.gitignore b/.gitignore
index 39ef52b..62c3cc0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*.sse2f
*.x86f
*.sparcf
+*.fas
*.fasl
*.err
*~
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
qd-methods.lisp | 7 +++++--
rt-tests.lisp | 7 +++++--
3 files changed, 11 insertions(+), 4 deletions(-)
hooks/post-receive
--
OCT: A portable Lisp implementation for quad-double precision floats
More information about the oct-cvs
mailing list