Why should the following code in Java
System.out.println(new Integer(1)/ new Double(0));
print 'Infinity' and not undefined. Isn't that mathematically wrong?
This is consistent with the IEEE 754 standard on floating-point, which Java follows.
1.4m articles
1.4m replys
5 comments
57.0k users