Resolution: Not A Problem
Affects Version/s: None
Fix Version/s: 3.0
The following tests show several contradictions:
They all pass; thus:
- "Double" does not behave as "double": (1) and (5) vs (6)
- Two NaNs are almost equal for Junit: (2)
- Two NaNs are never equal for MathUtils: (3) and (4)
- Complex.NaN is consistent with Object "Double.valueOf(NaN)" (hence not with primitive "Double.NaN"): (7)
This is quite confusing.
In MathUtils, we chose to follow IEEE754 (and Java for primitive "double"), i.e. it is "correct" that assertion (1) is false. Do we want "Complex" to conform with this or with the inconsistent behaviour of "Double"?