[git] CMU Common Lisp branch master updated. snapshot-2014-08-31-g9b6ad20
Raymond Toy
rtoy at common-lisp.net
Tue Aug 26 02:31:10 UTC 2014
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, master has been updated
via 9b6ad20132565202c72dec2dd2d8c6ee287c1601 (commit)
from 0abe7883718b87b3dee2d8e3fb698183cbbca932 (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 9b6ad20132565202c72dec2dd2d8c6ee287c1601
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Mon Aug 25 19:31:03 2014 -0700
Deprecate FLOAT-TRAPPING-NAN-P in favor of FLOAT-SIGNALING-NAN-P.
These numbers are called signaling, not trapping NaN in almost all
usages.
* code/exports.lisp:
* Export FLOAT-SIGNALING-NAN-P.
* code/float.lisp:
* Implement FLOAT-SIGNALING-NAN-P.
* Make FLOAT-TRAPPING-NAN-P an inline call to the
FLOAT-SIGNALING-NAN-P and add a docstring to say it is
deprecated.
* code/print.lisp:
* Print "Signaling" instead of "Trapping".
* i18n/locale/cmucl.pot:
* Regenerated due to the changes in docstrings.
diff --git a/src/code/exports.lisp b/src/code/exports.lisp
index 0f224f6..d3c8fa7 100644
--- a/src/code/exports.lisp
+++ b/src/code/exports.lisp
@@ -1416,7 +1416,8 @@
"DOUBLE-FLOAT-NEGATIVE-INFINITY" "LONG-FLOAT-NEGATIVE-INFINITY"
"GET-FLOATING-POINT-MODES" "SET-FLOATING-POINT-MODES"
"FLOAT-DENORMALIZED-P" "FLOAT-INFINITY-P"
- "FLOAT-NAN-P" "FLOAT-TRAPPING-NAN-P"
+ "FLOAT-NAN-P" "FLOAT-TRAPPING-NAN-P"
+ "FLOAT-SIGNALING-NAN-P"
"WITH-FLOAT-TRAPS-MASKED")
;; More float extensions
#+double-double
diff --git a/src/code/float.lisp b/src/code/float.lisp
index 9a7080d..cace1a4 100644
--- a/src/code/float.lisp
+++ b/src/code/float.lisp
@@ -57,7 +57,8 @@
single-float-negative-infinity short-float-negative-infinity
double-float-negative-infinity long-float-negative-infinity
set-floating-point-modes float-denormalized-p float-nan-p
- float-trapping-nan-p float-infinity-p))
+ float-trapping-nan-p float-infinity-p
+ float-signaling-nan-p))
#+double-double
(export '(least-positive-normalized-double-double-float
@@ -285,7 +286,7 @@
;;;; Float predicates and environment query:
(declaim (maybe-inline float-denormalized-p float-infinity-p float-nan-p
- float-trapping-nan-p))
+ float-signaling-nan-p))
;;; FLOAT-DENORMALIZED-P -- Public
;;;
@@ -344,7 +345,7 @@
#+double-double
(float-infinity-p (double-double-hi x)))
- (frob float-nan-p "Return true if the float X is a NaN (Not a Number)."
+ (frob float-nan-p "Return true if the float X is a quiet or signaling NaN (Not a Number)."
(not (zerop (ldb vm:single-float-significand-byte bits)))
(or (not (zerop (ldb vm:double-float-significand-byte hi)))
(not (zerop lo)))
@@ -354,8 +355,8 @@
#+double-double
(float-nan-p (double-double-hi x)))
- (frob float-trapping-nan-p
- "Return true if the float X is a trapping NaN (Not a Number)."
+ (frob float-signaling-nan-p
+ "Return true if the float X is a signaling NaN (Not a Number)."
(zerop (logand (ldb vm:single-float-significand-byte bits)
vm:single-float-trapping-nan-bit))
(zerop (logand (ldb vm:double-float-significand-byte hi)
@@ -364,8 +365,12 @@
(zerop (logand (ldb vm:long-float-significand-byte hi)
vm:long-float-trapping-nan-bit))
#+double-double
- (float-trapping-nan-p (double-double-hi x))))
+ (float-signaling-nan-p (double-double-hi x))))
+(declaim (inline float-trapping-nan-p))
+(defun float-trapping-nan-p (x)
+ "Deprecated. Use FLOAT-SIGNALING-NAN-P instead."
+ (float-signaling-nan-p x))
;;; FLOAT-PRECISION -- Public
;;;
@@ -928,7 +933,7 @@
;; Infinity is infinity, no matter how small...
x)
((float-nan-p x)
- (when (and (float-trapping-nan-p x)
+ (when (and (float-signaling-nan-p x)
(vm:current-float-trap :invalid))
(error 'floating-point-invalid-operation :operation 'scale-float
:operands (list x exp)))
diff --git a/src/code/print.lisp b/src/code/print.lisp
index f2a1205..778d827 100644
--- a/src/code/print.lisp
+++ b/src/code/print.lisp
@@ -1732,7 +1732,7 @@ radix-R. If you have a power-list then pass it in as PL."
(defun output-float-nan (x stream)
(print-unreadable-object (x stream)
(write-string (float-format-name x) stream)
- (write-string (if (float-trapping-nan-p x) " Trapping" " Quiet") stream)
+ (write-string (if (float-signaling-nan-p x) " Signaling" " Quiet") stream)
(write-string " NaN" stream)))
diff --git a/src/general-info/release-20f.txt b/src/general-info/release-20f.txt
index 7179f1f..14c64b8 100644
--- a/src/general-info/release-20f.txt
+++ b/src/general-info/release-20f.txt
@@ -64,6 +64,10 @@ New in this release:
CMUCL will not run on chips without SSE2 anymore.
* (cosh 1000d0) signals an overflow error as it
should. Previously, it just incorrectly returned infinity.
+ * Deprecating FLOAT-TRAPPING-NAN-P in favor of
+ FLOAT-SIGNALING-NAN-P.
+ * Changed the printer to print "Signaling" instead of "Trapping"
+ when printing a signaling NaN.
* ANSI compliance fixes:
* The values on the branch cuts for the inverse trig and
diff --git a/src/i18n/locale/cmucl.pot b/src/i18n/locale/cmucl.pot
index 15366ac..a885634 100644
--- a/src/i18n/locale/cmucl.pot
+++ b/src/i18n/locale/cmucl.pot
@@ -4783,11 +4783,15 @@ msgid "Return true if the float X is an infinity (+ or -)."
msgstr ""
#: src/code/float.lisp
-msgid "Return true if the float X is a NaN (Not a Number)."
+msgid "Return true if the float X is a quiet or signaling NaN (Not a Number)."
msgstr ""
#: src/code/float.lisp
-msgid "Return true if the float X is a trapping NaN (Not a Number)."
+msgid "Return true if the float X is a signaling NaN (Not a Number)."
+msgstr ""
+
+#: src/code/float.lisp
+msgid "Deprecated. Use FLOAT-SIGNALING-NAN-P instead."
msgstr ""
#: src/code/float.lisp
-----------------------------------------------------------------------
Summary of changes:
src/code/exports.lisp | 3 ++-
src/code/float.lisp | 19 ++++++++++++-------
src/code/print.lisp | 2 +-
src/general-info/release-20f.txt | 4 ++++
src/i18n/locale/cmucl.pot | 8 ++++++--
5 files changed, 25 insertions(+), 11 deletions(-)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-cvs
mailing list