StrictMath class Methods in Java Part -II

java.lang.StrictMath

The class StrictMath contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.


Some of the Methods of  StrictMath class.


StrictMath.exp(): . This method returns Euler's number e raised to the power of a double value.


StrictMath.expm1(): This method returns e^x -1 ( e pow x -1).


StrictMath.floor(): This method returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer.


StrictMath.floorDiv(int, int): This method returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.


StrictMath.floorDiv(long, long):  This method returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.


StrictMath.floorDiv(long, int): This method returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.


StrictMath.floorMod(int, int): This method returns the floor modulus of the int arguments.


StrictMath.floorMod(long, long): This method returns the floor modulus of the long arguments.


StrictMath.floorMod(long, int): This method returns the floor modulus of the long and int arguments.


StrictMath.fma(double, double, double): This method returns the fused multiply-add of the three arguments; that is, returns the exact product of the first two arguments summed with the third argument and then rounded once to the nearest double.


StrictMath.fma(float, float, float): This method returns the fused multiply-add of the three arguments; that is, returns the exact product of the first two arguments summed with the third argument and then rounded once to the nearest float.


StrictMath.getExponent(double): This method returns the unbiased exponent used in the representation of a double.


StrictMath.getExponent(float):  This method returns the unbiased exponent used in the representation of a float.


StrictMath.hypot(): . This method returns sqrt(x^2 +y^2) without intermediate overflow or underflow.


StrictMath.IEEEremainder():  This method computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. 


StrictMath.incrementExact(int): This method returns the argument incremented by one, throwing an exception if the result overflows an int. 


StrictMath.incrementExact(long): This method returns the argument incremented by one, throwing an exception if the result overflows a long.


StrictMath.log(): This method returns the natural logarithm (base e) of a double value.


StrictMath.log10(): This method returns the base 10 logarithms of a double value.


StrictMath.log1p(): This method returns the natural logarithm of the sum of the argument and 1.


Some more Methods of StrictMath class Part -I


Some more Methods of StrictMath class Part -III


Some more Methods of StrictMath class Part -IV



No comments:

Post a Comment