@@ -0,0 +1,443 @@
+%0A%0Apublic class NoNaNCompare%0A%7B%0A%09public static boolean checkIt( double d )%0A%09%7B%09// This is a probably a bug%0A%09%09return (d == Double.NaN);%0A%09%7D%0A%0A%09public static boolean checkIt( float f )%0A%09%7B%09// This is a probably a bug%0A%09%09return (f == Float.NaN);%0A%09%7D%0A%0A%09public static void main(String%5B%5D args)%0A%09%7B%0A%09%09double d = Double.NaN;%0A%09%09System.out.println( %22d is a NaN: %22 + checkIt( d ));%0A%09%09float f = Float.NaN;%0A%09%09System.out.println( %22f is a NaN: %22 + checkIt( f ));%0A%09%7D%0A%7D

write some bad code