You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am aware you want to follow Java's java.lang.Double.compare for Ordering (which strangely believes 0 * -1.0 < 0.0), but in this case I believe we should follow math/Math.signum's lead.
I think this would require overriding signum in DoubleIsConflicted from Numeric.scala.
The text was updated successfully, but these errors were encountered:
@dgruntz said:
Actually, in the current head release scala.math.signum(-0d) returns a negative zero (note, that a negative zero is equal to a positive zero if compared with ==).
Currently, (-0d).signum returns -1. I would expect this to return 0. For reference, the following works fine:
assert(scala.math.signum(-0d) == 0)
assert(java.lang.Math.signum(-0d) == 0)
But this blows up:
assert((-0d).signum == 0)
I am aware you want to follow Java's java.lang.Double.compare for Ordering (which strangely believes 0 * -1.0 < 0.0), but in this case I believe we should follow math/Math.signum's lead.
I think this would require overriding signum in DoubleIsConflicted from Numeric.scala.
The text was updated successfully, but these errors were encountered: