Skip to content
Snippets Groups Projects
Commit 86255342 authored by Michał Herda's avatar Michał Herda :thinking:
Browse files

Add note :NO-FLOATING-POINT-UNDERFLOW-BY-DEFAULT

This note assumes that the implementation purposefully does not conform to
12.1.4.3 by not signaling FLOATING-POINT-UNDERFLOW by default. (The
implementation should have an option of toggling this behaviour off in order
to be able to signal this condition when underflows occur.)

A reason for lack of conformance might be contradictory wording in the spec:
12.1.4.3 mentions that the errors should be signaled, while arithmetic
operations mention that they "might signal" the error.

Tests EXP{T,}.{8,9,10,11} have been annotated with this note.
parent beb164ff
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,14 @@ If negative zeros are distinct this is probably not good, since it makes (defcon
"Assume that the values of iteration values in LOOP's FINALLY clause are defined to never
overstep the iteration limit.")
(defnote :no-floating-point-underflow-by-default
"Assume that the implementation purposefully does not conform to 12.1.4.3 by not signaling
FLOATING-POINT-UNDERFLOW by default.
A reason for lack of conformance might be contradictory wording in the spec:
12.1.4.3 mentions that the errors should be signaled, while arithmetic
operations mention that they \"might signal\" the error.")
;;; Haible disagrees with :result-type-element-type-by-subtype
#+clisp (rt::disable-note :result-type-element-type-by-subtype)
#+(or openmcl gcl ecl) (rt::disable-note :nil-vectors-are-strings)
......
......@@ -62,21 +62,25 @@
t)
(deftest exp.error.8
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-short-float) 100))
floating-point-underflow)
t)
(deftest exp.error.9
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-single-float) 100))
floating-point-underflow)
t)
(deftest exp.error.10
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-double-float) 100))
floating-point-underflow)
t)
(deftest exp.error.11
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-double-float) 100))
floating-point-underflow)
t)
......@@ -36,18 +36,22 @@
t)
(deftest expt.error.8
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (expt least-positive-short-float 2) floating-point-underflow)
t)
(deftest expt.error.9
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (expt least-positive-single-float 2) floating-point-underflow)
t)
(deftest expt.error.10
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (expt least-positive-double-float 2) floating-point-underflow)
t)
(deftest expt.error.11
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (expt least-positive-long-float 2) floating-point-underflow)
t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment