This should be discussed in a separate ticket against the Complex class (done now - 37086).
The general policy in [math] is to use NaN consistently with floating point arithemtic specs (IEEE 754 for real, C99x Annex G for complex arithmetic) so for statistics such as Sum, Mean, etc. that involve arithmetic computations, NaN values force the return value to be NaN. The Min and Max order statistics ignore NaNs. Slightly inconsistently, the Percentile and Median order statistics use the total ordering determined by Double.compareTo which considers NaN as larger than any value (including Double.POSITIVE_INFINITY) and consider NaNs in the computation. All of this is specified in the javadoc for these statistics. Phil > > ------- Additional Comments From [EMAIL PROTECTED] 2005-10-13 16:45 ------- > The Complex class also has some questionable and undocumented behavior with > respect to NaN (and Inf). It might be worthwhile considering on a general NaN > policy for the math classes. > > -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
