Commit 5eeb6e31 authored by Daniel Kochmański's avatar Daniel Kochmański

Merge branch 'no-underflow-by-default' into 'master'

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

See merge request !29
parents d880405f 86255342
...@@ -50,6 +50,14 @@ If negative zeros are distinct this is probably not good, since it makes (defcon ...@@ -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 "Assume that the values of iteration values in LOOP's FINALLY clause are defined to never
overstep the iteration limit.") 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 ;;; Haible disagrees with :result-type-element-type-by-subtype
#+clisp (rt::disable-note :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) #+(or openmcl gcl ecl) (rt::disable-note :nil-vectors-are-strings)
......
...@@ -62,21 +62,25 @@ ...@@ -62,21 +62,25 @@
t) t)
(deftest exp.error.8 (deftest exp.error.8
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-short-float) 100)) (signals-error (exp (- (log least-positive-short-float) 100))
floating-point-underflow) floating-point-underflow)
t) t)
(deftest exp.error.9 (deftest exp.error.9
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-single-float) 100)) (signals-error (exp (- (log least-positive-single-float) 100))
floating-point-underflow) floating-point-underflow)
t) t)
(deftest exp.error.10 (deftest exp.error.10
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-double-float) 100)) (signals-error (exp (- (log least-positive-double-float) 100))
floating-point-underflow) floating-point-underflow)
t) t)
(deftest exp.error.11 (deftest exp.error.11
:notes (:no-floating-point-underflow-by-default :ansi-spec-problem)
(signals-error (exp (- (log least-positive-double-float) 100)) (signals-error (exp (- (log least-positive-double-float) 100))
floating-point-underflow) floating-point-underflow)
t) t)
...@@ -36,18 +36,22 @@ ...@@ -36,18 +36,22 @@
t) t)
(deftest expt.error.8 (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) (signals-error (expt least-positive-short-float 2) floating-point-underflow)
t) t)
(deftest expt.error.9 (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) (signals-error (expt least-positive-single-float 2) floating-point-underflow)
t) t)
(deftest expt.error.10 (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) (signals-error (expt least-positive-double-float 2) floating-point-underflow)
t) t)
(deftest expt.error.11 (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) (signals-error (expt least-positive-long-float 2) floating-point-underflow)
t) t)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment