You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/01/26 19:57:09 UTC
DO NOT REPLY [Bug 24962] -
[math] MathUtils.sign(NaN) returns -1 instead of NaN
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24962>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24962
[math] MathUtils.sign(NaN) returns -1 instead of NaN
------- Additional Comments From mdiggory@latte.harvard.edu 2004-01-26 18:57 -------
I'm not sure if this was completed?
In conclusion I think we came to the following
public double sign(double d);
+1 : d > 0
0 : d = 0
-1 : d < 0
public double indicator(double d);
+1 : d >= 0
-1 : d < 0
Change The Complex implementation to use indicator instead of sign. In both
cases return NaN id d = NaN.
-Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org