Math functions supported by the General Refine Expression Language (GREL)
See also: GREL Functions.
NOTE: For Integer division and precision you can use simple evaluations such as
1 / 2
which is equivalent to floor(1/2) i.e. it returns only whole number results. If either operand is a floating point number, they both get promoted to floating point and a floating point result is returned. You can use 1 / 2.0 or 1.0 / 2 or 1.0 * x / y (if you're working with variables of unknown contents) to achieve the results you desire.
Returns the floor of a number. For example, floor(3.7) returns 3 and floor(-3.7) returns -4.
Returns the ceiling of a number. For example, ceil(3.7) returns 4 and ceil(-3.7) returns -3.
Rounds a number to the nearest integer. For example, round(3.7) returns 4 and round(-3.7) returns -4.
Returns the smaller of two numbers.
Returns the larger of two numbers.
Returns d1 modulus d2. For examples, mod(74, 9) returns 2.
Returns the natural log of d.
Returns the base 10 log of d.
Returns e raised to the power of d.
Returns d raised to the power of e. For example, pow(2, 3) returns 8 (2 cubed) and pow(3, 2) returns 9 (3 squared).
The Square Root of any numeric value is expressed pow(value, 0.5)
Returns the sum of numbers in a.