21.3 The Members of the Math Class
The java.lang.Math class is a typical utility class that declares only static methods and class variables for constants. The private constructor can’t be used to create instances of Math . All operations take place strictly according to the IEEE-754 specification.
[»] History Lesson
Between Java 1.2 and Java 16, the Java compiler supported the strictfp keyword. The distinction was supposed to allow the JVM to not strictly follow the IEEE-754 specification and thus execute Java programs more quickly on local hardware. However, for the last 20 years, all processors have supported IEEE-754, and the distinction has become irrelevant—all mathematical operations performed by the JVM are as described in the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access