double division by zero inconsistency

Description

Division by zero with doubles will throw an exception if both arguments are boxed, but not otherwise:

Environment

None

Activity

Show:
Erik Assum
October 4, 2017, 6:43 PM

Any thoughts on an approach?
Both throwing on division by zero for natives and allowing it for boxed seems to be a serious change, and the tests expects an exception for boxed division by zero.

Erik Assum
September 28, 2017, 7:10 PM

So, I guess some division by zero is somewhat undefined.
If one removes

then

returns infinity as the unboxed versions.

Although doing so, also causes a change to

which then becomes `1/0`, whereas it previously threw Divide by zero.

From Numbers.java we see that unboxed math does not protect against division by zero:

whereas boxed versions do:

This inconsistency is also reproducible with clojure 1.8:

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Greg Chapman

Labels

Approval

Triaged

Priority

Minor

Affects versions