public static boolean isNaN(float v) { return (v != v); }
float f = 0.0f; float d = 0.0f; System.out.println(Float.isNaN(f/d));//true System.out.println(f/d);//NaN