java.lang StrictMath
The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
In order to ensure portability, some numeric functions on this package is based on a well known network library netlib as the package “Freely Distributable Math Library,” fdlibm. These algorithms, which are written in the C programming language, are then to be understood as executed with all floating-point operations following the rules of Java floating-point arithmetic.
The Java math library is defined with respect to fdlibm version 5.3. Where fdlibm provides more than one definition for a function (such as acos), use the “IEEE 754 core function” version (residing in a file whose name begins with the letter e). The methods which require fdlibm semantics are sin, cos, tan, asin, acos, atan, exp, log, log10, cbrt, atan2, pow, sinh, cosh, tanh, hypot, expm1, and log1p.
Math Class Syntax
public final class StrictMath
extends Object
Java StrictMath Compatibility
The StrictMath class has been around since Java 1.3 though some of it’s methods were added on the later releases.
StrictMath Method Usage Examples
The following are the detailed list of StrictMath methods and descriptions. We have also provided links to examples of each method on the list.
Modifier and Type | Method and Description |
---|---|