class Test { void f(double x, float y) { if (x == Double.NaN) return; if (y == Float.NaN) return; } }