FLOATING-POINT-INVALID-OPERATION compiling NaNs
Bug #486812 reported by
3b
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
compiling
(defun foo () (sb-kernel:
on 1.0.32.
causes
debugger invoked on a FLOATING-
arithmetic error FLOATING-
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
0] 0
pkhuong suggests make-numeric-type as the problem
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
There's no way to represent NaNs in numeric types. This results in other bugs, e.g.
(defun foo (x) propagated away
(declare (double-float x)) ; weirdly enough, the constraints are too simple-minded to be a problem otherwise
(cond ((< x 0))
((< -1 x))
(t 42))) ; the last clause is constraint-
Another instance of the FP correctness metabug. I think we want to extend float types to also indicate whether they contain SNaNs, QNaNs or infinities (and maybe signed zeros or denorms). I'm not sure how to expose that to the user.