float division by zero

Solutions on MaxInterview for float division by zero by the best coders in the world

showing results for - "float division by zero"
Jacinda
26 Feb 2019
1float x = 1.0f / 0.0f;
2System.out.println(x);  // Infinity
3float y = -1.0f / 0.0f;
4System.out.println(y);  // -Infinity
5float z = 0.0f / 0.0f;
6System.out.println(z);  // NaN