commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@worden.org
Subject Re: DO NOT REPLY [Bug 24962] - [math] MathUtils.sign(NaN) returns -1 instead of NaN
Date Mon, 26 Jan 2004 21:11:47 GMT
> 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
> 
> -Mark

I think I misstated the properties of an indicator function in the
original thread.

An indicator function returns 0 or 1, not -1 or 1.

I don't know if this should impact our choice of method names or not. 
Maybe just good documentation is needed to prevent any confusion.

Brent Worden
http://www.brent.worden.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message