Hi, I try to add the method toString() to Complex. There some issues arise:
If ether the real or imaginary part is NaN hashCode() will return the same value. Complex.toString() should return Double.valueOf(Double.NaN). Is thee a need to store the given values of the real/imaginary part? or set both to Double.NaN in the constructor? Maybe drop the constructor completely, make createComplex(...) public and return in this case Complex.NaN which is then the marker for NaN values? the methods add/subtract handle NaN values different one will return Complex.NaN the other will calculate the result and result.isNaN() == true. This makes in my opinion no sense, because result.hashCode() == Complex.NaN,hashCode()... Arne --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org