## 15.6 Using Math Functions

The math functions allow you to perform various mathematical operations and calculations ranging from simple to complex.

The following math functions are supported in this release:

Function Name Description

`IEEEremainder(value1,value2)`

Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard

`abs(value1)`

Returns the absolute value of a number

`acos(value1) `

Returns arc cosine of a value

`asin(value1) `

Returns arc sine of a value

`atan(value1) `

Returns arc tangent of a value

`atan2(arg1,arg2)`

Returns polar angle of a point (`arg2`, `arg1`)

`binomial(base,power) `

Returns binomial coefficient of the base raised to the specified power

`bitMaskWithBitsSetFromTo(x) `

`cbrt(value1)`

Returns cubic root of the specified value

`ceil(value1)`

Rounds to ceiling

`copySign(value1,value2)`

Returns the first floating-point argument with the sign of the second floating-point argument

`cos(value1)`

Returns cosine of a value

`cosh(value1)`

Returns cosine hyperbolic of a value

`exp(x) `

Returns exponent of a value

`expm1(x)`

More precise equivalent of `exp(x)`; Returns 1 when x is around zero

`factorial(value1) `

Returns factorial of a natural number

`floor(value1) `

Rounds to floor

`getExponent(value1)`

Returns the unbiased exponent used in the representation of a double

`getSeedAtRowColumn(value1,value2) `

Returns a deterministic seed as an integer from a (seemingly gigantic) matrix of predefined seeds

`hash(value1)`

Returns an integer hashcode for the specified double value

`hypot(value1,value2) `

Returns square root of sum of squares of the two arguments

`leastSignificantBit(value1)`

Returns the least significant 64 bits of this UUID's 128 bit value

`log(value1,value2) `

Calculates the log value of the given argument to the given base, where `value 1` is the value and `value 2` is the base

`log1(value1)`

Returns the natural logarithm of a number

`log10(value1) `

Calculates the log value of the given argument to base 10

`log2(value1) `

Calculates the log value of the given argument to base 2

`logFactorial(value1) `

Returns the natural logarithm (base e) of the factorial of its integer argument as a double

`longFactorial(value1)`

Returns the factorial of its integer argument (in the range k >= 0 && k < 21) as a long

`maximum(value1,value2)`

Returns the maximum of 2 arguments

`minimum(value1,value2) `

Returns the minimum of 2 arguments

`mod(value1,value2) `

Returns modulo of a number

`mosttSignificantBit(value1) `

Returns the most significant 64 bits of this UUID's 128 bit value

`nextAfter(value1,value2)`

Returns the floating-point number adjacent to the first argument in the direction of the second argument

`nextDown(value1)`

Returns the floating-point value adjacent to the input argument in the direction of negative infinity

`nextUp(value1)`

Returns the floating-point value adjacent to the input argument in the direction of positive infinity

`Pow(m,n)`

Returns m raised to the nth power

`rint(value1)`

Returns the double value that is closest in value to the argument and is equal to a mathematical integer

`round(value1) `

Rounds to the nearest integral value

`Scalb(d,scaleFactor)`

Returns d × 2scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the double value set

`signum(value1)`

Returns signum of an argument as a double value

`sin(value1)`

Returns sine of a value

`sinh(value1) `

Returns sine hyperbolic of a value

`sqrt(value1) `

Returns square root of a value

`stirlingCorrection(value1)`

Returns the correction term of the Stirling approximation of the natural logarithm (base e) of the factorial of the integer argument as a double

`tan(value1)`

Returns tangent of a value

`tanh(value1)`

Returns tangent hyperbolic of a value

`toDegrees(value1)`

Converts the argument value to degrees

`toRadians(value1) `

Returns the measurement of the angle in radians

`ulp(value1)`

Returns the size of an ulp of the argument