Clojure

divide(Object, Object) with (NaN, 0) does not return NaN

Details

  • Type: Defect Defect
  • Status: Reopened Reopened
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:

Description

user=> (def x Double/NaN)
#'user/x
user=> (/ x 0)

ArithmeticException Divide by zero clojure.lang.Numbers.divide (Numbers.java:156)
user=> (/ Double/NaN 0)
Double/NaN

Activity

Alex Miller made changes -
Field Original Value New Value
Resolution Declined [ 2 ]
Status Open [ 1 ] Closed [ 6 ]
Alex Miller made changes -
Status Closed [ 6 ] Reopened [ 4 ]
Resolution Declined [ 2 ]
Alex Miller made changes -
Priority Major [ 3 ] Trivial [ 5 ]
Alex Miller made changes -
Labels math
Alex Miller made changes -
Summary Weird NaN behavior divide(Object, Object) with (NaN, 0) does not return NaN

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: