floating point interval arithmetic bounds
Bug #793771 reported by
Nikodemus Siivola
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
(defun foo (x)
(assert (> x 0)))
(defun test ()
(loop for f = most-positive-
while (> f 0d0)
do (foo f)))
(test) -| assertion fails
PROPAGATE-FROM-REFS gets (DOUBLE-FLOAT (0.0D0)) as the type of F, which in turn leads (> F 0d0) being eliminated.
tags: | added: fp |
tags: |
added: floating-point removed: fp |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The real issue is BOUND-BINOP not realizing that (0d0) * 0.5 can round to zero. (And similarly for other ops and FP arguments.)