commons-issues mailing list archives

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


Gilles commented on MATH-370:

The Javadocs for "Float" and "Double" also indicate the special behaviour for NaN in a number
object.  Nevertheless, the _primitive_ types are compliant with IEEE. Hence, there is an inconsistency
between the "equals" methods in "MathUtils" and the behaviour of the JVM.

> 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