Project: Floating Point Overflow
Write a program to print the largest positive floating point value that is possible to represent accurately with [[IEEE doubles]]. Also print a value slightly larger to show what happens on overflow. Does the language produce an error or simply a warning on overflow?
Output
$ javac -Xlint FloatingPointOverflow.java
$ java -ea FloatingPointOverflow
Larg float: 1.0E308
Larger float: Infinity
Largest float: Infinity