Win32 only: double >= NaN returns true. It should not.
NaN should not be ordered, so any comparison except != should return false. Same
problem with Float.NaN.
Steps to reproduce
Compile and run the attached code
Note: you should not see the Warning message.
public class FloatTest2
{
public static void main(String argv[])
{
double x = 3.1415926;
double y = Double.NaN;
System.out.println( "x == " + x );
System.out.println( "y == " + y );
System.out.println( ! ( x < y ) );
System.out.println( x >= y );
if ( (!( x < y ) ) == ( x >= y ) )
System.out.println( "Warning! !(x<y) should not equal (x>=y)");
}
}
NaN should not be ordered, so any comparison except != should return false. Same
problem with Float.NaN.
Steps to reproduce
Compile and run the attached code
Note: you should not see the Warning message.
public class FloatTest2
{
public static void main(String argv[])
{
double x = 3.1415926;
double y = Double.NaN;
System.out.println( "x == " + x );
System.out.println( "y == " + y );
System.out.println( ! ( x < y ) );
System.out.println( x >= y );
if ( (!( x < y ) ) == ( x >= y ) )
System.out.println( "Warning! !(x<y) should not equal (x>=y)");
}
}