Troubleshooting and Reference Guide : Available Functions : Using Core Functions : Math Functions
 
Share this page                  
Math Functions
The Math category provides implementations of common math functions. For more information about Math functions, see java.lang.Math.
All trigonometric functions use radians by default. Use the toDegrees and toRadians functions to convert between radians and degrees.
Function Name
Description
Output Type
Parameters
Math.abs
Returns absolute value of the given field.
Type of expr
Numeric value
Math.acos
Returns arc cosine of the given field.
Double
Numeric value
Math.asin
Returns arc sine of the given field.
Double
Numeric value
Math.atan
Returns arc tangent of the given field.
Double
Numeric value
Math.atan2
Returns angle theta from the conversion of rectangular coordinates (x,y) to polar coordinates (r,theta).
Double
Numeric value
Numeric value
Math.cbrt
Returns cube root of the given field.
Double
Numeric value
Math.ceil
Returns ceiling of the given field.
Double
Numeric value
Math.copySign
Returns magnitude of the first field with sign of the second field.
Type of magnitude (Double or Float)
Numeric value
Numeric value
Math.cos
Returns cosine of the given field.
Double
Numeric value
Math.cosh
Returns hyperbolic cosine of the given field.
Double
Numeric value
Math.e
Returns mathematical constant e.
Double
(none)
Math.exp
Returns e raised to power of the given field.
Double
Numeric value
Math.expm1
Returns eexpr-1.
Double
Numeric value
Math.floor
Returns floor of the given field.
Double
Numeric value
Math.getExponent
Returns neutral exponent used in the representation of a double or float field.
Integer
Numeric value
Math.hypot
Returns sqrt(x2+y2) without intermediate overflow or underflow.
Double
Numeric value
Math.IEEEremainder
Returns IEEE 754 standard remainder from dividing dividend by divisor.
Double
Numeric value
Numeric value
Math.log
Returns natural logarithm of the given field.
Double
Numeric value
Math.log10
Returns base 10 logarithm of the given field.
Double
Numeric value
Math.log1p
Returns natural logarithm of sum of the given field and 1.
Double
Numeric value
Math.max
Returns maximum value of the arguments. If any argument is null, then the result is null.
Type of the arguments
Numeric values
Math.maxNotNull
Returns maximum value of the arguments, ignoring any null values. The result is null only if all the arguments are null.
Type of the arguments
Numeric values
Math.min
Returns minimum value of the arguments. If any argument is null, then the result is null.
Type of the arguments
Numeric values
Math.minNotNull
Returns minimum value of the arguments, ignoring any null values. The result is null only if all the arguments are null.
Type of the arguments
Numeric values
Math.nextAfter
Returns floating-point value adjacent to start in the direction of direction.
Type of start (Double or Float)
Numeric value
Numeric value
Math.nextUp
Returns floating-point value adjacent to start in the direction of positive infinity.
Type of start (Double or Float)
Numeric value
Math.pi
Returns mathematical constant pi.
Double
(none)
Math.pow
Returns base to the power of exponent.
Double
Numeric value
Numeric value
Math.precision
Returns precision of the field.
Integer
Double value
Math.random
Returns a random value greater than or equal to 0 and less than 1.
The value returned by this function may be reevaluated if it is referenced in a subsequent expression within the same operator. To maintain a consistent value, subsequent references should be made in a downstream operator.
Double
(none)
Math.rint
Returns double value closest to the given field value that is equal to a mathematical integer.
Double
 
Math.round
Returns field rounded to the nearest whole number.
Long if expr is a Double
Integer if expr is a Float
Numeric value
Math.scalb
Returns expr x 2 scaleFactor rounded as if performed by a single correctly rounded floating-point multiply.
Type of expr (Double or Float)
Numeric value
Numeric value
Math.scale
Returns scale of the field.
Integer
Double value
Math.signum
Returns signum function of the argument - 0 if the field is zero, 1 if the field is greater than zero, or -1 if the field is less than zero.
Type of expr (Double or Float)
Numeric value
Math.sin
Returns sine of the given field.
Double
Numeric value
Math.sinh
Returns hyperbolic sine of the given field.
Double
Numeric value
Math.sqrt
Returns square root of the given field.
Double
Numeric value
Math.tan
Returns tangent of the given field.
Double
Numeric value
Math.tanh
Returns hyperbolic tangent of the given field.
Double
Numeric value
Math.toDegrees
Returns the given field converted from radians to degrees.
Double
Numeric value
Math.toRadians
Returns the given field converted from degrees to radians.
Double
Numeric value
Math.ulp
Returns size of an ulp of the given field.
Type of expr (Double or Float)
Numeric value