commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobr...@transolutions.net (O'brien, Tim)
Subject [math] exceptions or NaN from Univariate
Date Tue, 13 May 2003 22:55:57 GMT
Univariate getMean(), getVariance(), and getStandardDeviation() all
contain a note to throw an exception if n = 0.  It should be noted that
getVariance() and getStandardDeviation() don't make sense until n = 2.

The mean of an empty set is not a number, and currently calling (new
Univariate("blah")).getMean() returns NaN.  I'm just wondering if
throwing an exception is worth the trouble?  Any thoughts?
 
Tim
 



---------------------------------------------------------------------
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