Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The documentation below is generated from the
system.functions system tableceil
Introduced in: v1.1.0 Likefloor but returns the smallest rounded number greater than or equal to x.
If rounding causes an overflow (for example, ceiling(255, -1)), the result is undefined.
Syntax
ceiling
Arguments
x— The value to round.Float*orDecimal*or(U)Int*N— Optional. The number of decimal places to round to. Defaults to zero, which means rounding to an integer. Can be negative.(U)Int*
x. Float* or Decimal* or (U)Int*
Examples
Basic usage
Query
Response
Query
Response
floor
Introduced in: v1.1.0 Returns the largest rounded number less than or equal tox, where the rounded number is a multiple of 1 / 10 * N, or the nearest number of the appropriate data type if 1 / 10 * N isn’t exact.
Integer arguments may be rounded with a negative N argument.
With non-negative N the function returns x.
If rounding causes an overflow (for example, floor(-128, -1)), the result is undefined.
Syntax
x— The value to round.Float*orDecimal*or(U)Int*N— Optional. The number of decimal places to round to. Defaults to zero, which means rounding to an integer. Can be negative.(U)Int*
x. Float* or Decimal* or (U)Int*
Examples
Usage example
Query
Response
Query
Response
round
Introduced in: v1.1.0 Rounds a value to a specified number of decimal placesN.
- If
N > 0, the function rounds to the right of the decimal point. - If
N < 0, the function rounds to the left of the decimal point. - If
N = 0, the function rounds to the next integer.
Float* inputs and rounds away from zero for the other number types (Decimal*).
If rounding causes an overflow (for example, round(255, -1)), the result is undefined.
Syntax
x— A number to round.Float*orDecimal*or(U)Int*N— Optional. The number of decimal places to round to. Defaults to0.(U)Int*
x. Float* or Decimal* or (U)Int*
Examples
Float inputs
Query
Response
Query
Response
roundAge
Introduced in: v1.1.0 Takes a number representing a human age, compares it to standard age ranges, and returns either the highest or lowest value of the range the number falls within.- Returns
0, forage < 1. - Returns
17, for1 ≤ age ≤ 17. - Returns
18, for18 ≤ age ≤ 24. - Returns
25, for25 ≤ age ≤ 34. - Returns
35, for35 ≤ age ≤ 44. - Returns
45, for45 ≤ age ≤ 54. - Returns
55, forage ≥ 55.
age falls within. UInt8
Examples
Usage example
Query
Response
roundBankers
Introduced in: v20.1.0 Rounds a number to a specified decimal positionN.
If the rounding number is halfway between two numbers, the function uses a method of rounding called banker’s rounding, which is the default rounding method for floating point numbers defined in IEEE 754.
- If
N > 0, the function rounds to the right of the decimal point - If
N < 0, the function rounds to the left of the decimal point - If
N = 0, the function rounds to the next integer
Notes
- When the rounding number is halfway between two numbers, it’s rounded to the nearest even digit at the specified decimal position.
For example:
3.5rounds up to4,2.5rounds down to2. - The
roundfunction performs the same rounding for floating point numbers. - The
roundBankersfunction also rounds integers the same way, for example,roundBankers(45, -1) = 40. - In other cases, the function rounds numbers to the nearest integer.
x— A number to round.(U)Int*orDecimal*orFloat*[, N]— Optional. The number of decimal places to round to. Defaults to0.(U)Int*
(U)Int* or Decimal* or Float*
Examples
Basic usage
Query
Response
roundDown
Introduced in: v20.1.0 Rounds a number down to an element in the specified array. If the value is less than the lower bound, the lower bound is returned. Syntaxnum— A number to round down.(U)Int*orDecimal*orFloat*arr— Array of elements to roundnumdown to.Array((U)Int*)orArray(Float*)
arr. If the value is less than the lowest bound, the lowest bound is returned. (U)Int* or Float*
Examples
Usage example
Query
Response
roundDuration
Introduced in: v1.1.0 Rounds a number down to the closest from a set of commonly used durations:1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000.
If the number is less than one, it returns 0.
Syntax
0, for num < 1. Otherwise, one of: 1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000. UInt16
Examples
Usage example
Query
Response
roundToExp2
Introduced in: v1.1.0 Rounds a number down to the nearest (whole non-negative) power of two. If the number is less than one, it returns0.
Syntax
num rounded down to the nearest (whole non-negative) power of two, otherwise 0 for num < 1. (U)Int* or Float*
Examples
Usage example
Query
Response
trunc
Introduced in: v1.1.0 Likefloor but returns the rounded number with the largest absolute value less than or equal to that of x.
Syntax
truncate
Arguments
x— The value to round.Float*orDecimal*or(U)Int*N— Optional. The number of decimal places to round to. Defaults to zero, which means rounding to an integer.(U)Int*
x. Float* or Decimal* or (U)Int*
Examples
Basic usage
Query
Response