commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <>
Subject [jira] Commented: (MATH-370) NaN in "equals" methods
Date Fri, 07 May 2010 14:31:51 GMT


Luc Maisonobe commented on MATH-370:

I really think this is intentional and the fact that NaN != Nan was known to the people who
did that.
For example, the javadoc for Complex.equals ([])
explicitly warns about behavior for NaN.
So on the one one changing this would break compatibility with respect to a documented behavior
and on the other hand it would bring compatibility with IEEE arithmetic.
I'm sure there is a good reason for the current status, but I don't know it.

> NaN in "equals" methods
> -----------------------
>                 Key: MATH-370
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Gilles
>            Priority: Minor
> In "MathUtils", some "equals" methods will return true if both argument are NaN.
> Unless I'm mistaken, this contradicts the IEEE standard.
> If nobody objects, I'm going to make the changes.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message