java float 0/0 code example Example: java float 0/0 assertEquals(Float.NaN, 0f / 0); assertEquals(Double.NaN, 0d / 0);