Mathematical Functions
This page lists the mathematical functions that are available in the GSQL query language. They are divided into three categories:
-
General
-
Logarithmic
-
Trigonometric
General
floor()
rand()
Description
Returns a completely random number >= 0 and <1. If seed is specified, it returns a repeatable sequence of random numbers. If no seed is specified, it returns a completely random number.
round()
Description
Rounds a number to a specified place relative to the decimal point and returns the result.
Parameters
| Parameter | Description | Data type |
|---|---|---|
|
The number to be rounded |
|
|
Optional. An integer value indicating the place to round the first
argument to. + If |
|
sign()
trunc()
Description
Returns a number truncated to the specified number of decimal places.
If the number of decimal places is either 0 or omitted, then the number is truncated to an integer value.
The decimal_places parameter can be negative, meaning the target precision is to the left of the decimal point.
This effectively rounds the number to some power of 10.
Return type
DOUBLE
|
Numbers with a positive value for |