Re: [math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Arne Ploese
Am Dienstag, den 12.07.2011, 09:24 -0700 schrieb Phil Steitz: > On 7/12/11 8:49 AM, Arne Ploese wrote: > > Am Dienstag, den 12.07.2011, 16:24 +0200 schrieb Gilles Sadowski: > >> Hello. > >> > >>> I try to add the method toString() to Complex. > >> I've created an issue for this: > >> https://is

Re: [math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Phil Steitz
On 7/12/11 8:49 AM, Arne Ploese wrote: > Am Dienstag, den 12.07.2011, 16:24 +0200 schrieb Gilles Sadowski: >> Hello. >> >>> I try to add the method toString() to Complex. >> I've created an issue for this: >> https://issues.apache.org/jira/browse/MATH-614 > I would prefer something like: re

Re: [math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Arne Ploese
Am Dienstag, den 12.07.2011, 16:24 +0200 schrieb Gilles Sadowski: > Hello. > > > I try to add the method toString() to Complex. > > I've created an issue for this: > https://issues.apache.org/jira/browse/MATH-614 I would prefer something like: >>>return Double.valueOf(real) + imaginary < 0 ?

Re: [math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Gilles Sadowski
Hello. > I try to add the method toString() to Complex. I've created an issue for this: https://issues.apache.org/jira/browse/MATH-614 With the "ComplexFormat" class, the "toString" method should be trivial to add to the "Complex" class. [This is already done in my working copy of the code.] Pl

[math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Arne Ploese
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 bo