#672 closed defect (wontfix)
CR: Division by inexact zero results in infinity (or nan) as per IEEE 754
Reported by: | sjamaan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | core libraries | Version: | 4.7.x |
Keywords: | numbers, flonums, IEEE 754 | Cc: | |
Estimated difficulty: |
Description
Current behaviour in Chicken core AND the numbers egg is not IEEE754-compliant (afaik):
(/ 1.0 0.0) => error: division by zero (/ -1.0 0.0) => error: division by zero (/ 0.0 0.0) => error: division by zero
Should this be changed to return +inf.0, -inf.0 and +nan.0, respectively?
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
My only argument against doing this in core is that large exacts may be coerced to inexact without warning, which would change the result of the computation from error to inf/nan. (We also know Felix is opposed to changing the behavior of the / operator in core (fp/ already returns the correct result)).
However, the numbers egg does not exhibit this problem, so in my opinion, you should change numbers to return IEEE 754 compliant results.