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 [EMAIL PROTECTED]  2003-11-25 14:35 -------
As the original author of this sign(), I just want to give etymological history.  My 
sign() was 
intended to be used as it apparently is in the static Complex#sqrt:  a way to be able 
to multiply by 
the sign of a number.  In this role, it would not be inconsistent to return NaN for a 
NaN argument, 
but I believe in the particular use that prompted me to think of creating this method, 
an argument 
of 0 should still return +1.  I support renaming this sign() and implementing a new 
version of the 
existing method that has the requested behavior, as my usage is almost certainly less 
common 
than that being requested.  The name "positiveSign" isn't as clear as I'd like, but I 
can't think 
offhand of a better one (the first ones that came to mind were signIsPositive, signum, 
and sgn).

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to