Help save net neutrality! Learn more.
Close

#810 Comparison of NaNs

closed-fixed
5
2009-11-30
2009-10-25
No

In interactions pane, NaNs are compared incorrectly.
Example:
double d = Double.NaN;
d == d
d == Double.NaN
both return true, which is incorrect.
According to IEEE 754, all comparisons with a NaN must return false.
In non-interactive mode, the result of e.g.
System.out.println (d==d);
is correct, i.e. false.

DrJava Version : drjava-20090821-r5004 on WIn XP, Java build 1.6.0_16-b01

Discussion

  • Mathias Ricken

    Mathias Ricken - 2009-10-27
    • status: open --> open-accepted
     
  • Mathias Ricken

    Mathias Ricken - 2009-11-30

    Fixed as of revision 5138.

     
  • Mathias Ricken

    Mathias Ricken - 2009-11-30

    Fixed in SVN.

     
  • Mathias Ricken

    Mathias Ricken - 2009-11-30
    • assigned_to: nobody --> mgricken
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.