This page lists the mathematical functions that are available in the GSQL query language. They are divided into three categories:
General
Logarithmic
Trigonometric
abs()
abs( num )
Returns the absolute value of a number.
Number
ceil()
ceil(num)
Rounds a number up to the smallest integer that's greater than or equal to the number.
INT
exp()
exp(num)
Returns the base-e exponential of a number.
FLOAT
float_to_int()
float_to_int (num)
Converts a floating-point number to an integer by truncating the floating part.
INT
floor()
floor(num)
Rounds a number down to the biggest integer that is smaller than or equal to the number.
INT
fmod()
fmod(numer, denom)
Returns the floating-point remainder of numer
divided by denom
FLOAT
ldexp()
ldexp(x, exp)
Returns x
multiplied by 2 raised to the power of exp
FLOAT
pow()
pow(base, exp)
Returns the power of a number.
FLOAT
sqrt()
sqrt(num)
Returns the square root of a number
FLOAT
log(num)
Returns the natural logarithm of a number (base e).
FLOAT
log10()
log10(num)
Return the common logarithm of a number (base 10).
FLOAT
acos()
acos(num)
Returns the arc cosine of a number.
FLOAT
asin()
asin(num)
Returns the arc sine of a number.
FLOAT
atan()
atan(num)
Returns the arctangent of a number.
FLOAT
atan2()
atan2(y, x)
Returns the arctangent of a fraction.
FLOAT
cos(num)
Returns the cosine of a number.
FLOAT
cosh()
cosh(num)
Returns the hyperbolic cosine of a number.
FLOAT
sin()
sin(num)
Returns the sine of a number.
FLOAT
sinh()
sinh(num)
Returns the hyperbolic sine of a number.
FLOAT
tan()
tan(num)
Returns the tangent of a number.
FLOAT
tanh()
tanh(num)
Returns the hyperbolic tangent of a number.
FLOAT
Parameter
Description
Data type
num
The number to return the absolute value for
Number
Parameter
Description
Data type
num
The number to round up from
num
Parameter
Description
Data type
num
The exponent
Number
Parameter
Description
Data type
num
The floating-point number to convert to integer
FLOAT
Parameter
Description
Data type
num
The number to round down from
Number
Parameter
Description
Data type
numer
The dividend
Number
denom
The divisor
Number
Parameter
Description
Data type
x
The base
Number
exp
The exponent of 2
Number
Parameter
Description
Data type
base
The base
Number
exp
The exponent
Number
Parameter
Description
Data type
num
The number to get square root for.
Number
Parameter
Description
Data type
num
The number to compute natural logarithm for
Number
Parameter
Description
Data type
num
The number to compute common logarithm for
Number
Parameter
Description
Data type
num
The number to compute arccosine for
Number
Parameter
Description
Data type
num
The number to compute arcsine for
Number
Parameter
Description
Data type
num
The number to compute arctangent for
Number
Parameter
Description
Data type
y
The dividend of the fraction to compute arctangent for
Number
x
The divisor of the fraction to compute arctangent for
Number
Parameter
Description
Data type
num
The number to return cosine for
Number
Parameter
Description
Data type
num
The number to compute hyperbolic cosine for
Number
Parameter
Description
Data type
num
The number to compute sine for
Number
Parameter
Description
Data type
num
The number to compute hyperbolic sine for
Number
Parameter
Description
Data type
num
The number to compute tangent for
Number
Parameter
Description
Data type
num
The number to compute hyperbolic tangent for
Number