A numerical function is a function used to process numerical data. It can operate on the input value according to specific mathematical rules and return a new numerical result. This topic describes how to use numeric functions in built-in functions.
BI_ABS
BI_ABS is used to calculate the absolute value of a value.
Syntax | BI_ABS(number) |
Description | number: the value of the absolute value to be obtained. |
Description | Returns the absolute value of <number>. |
Output data type | N/A |
Examples | BI_ABS(-1.5) = 1.5 |
BI_CEILING
BI_CEILING is used to round a value up.
Syntax | BI_CEILING(number) |
Description | number: the numeric value to be rounded. |
Description | Rounds up to the smallest integer that is greater than or equal to a number. |
Output data type | Integer |
Examples | BI_CEILING(2.5) = 3 |
BI_EXP
BI_EXP is used to calculate e raised to the power of n. The constant e is the base of the natural logarithm, approximately equal to 2.71828.
Syntax | BI_EXP(number) |
Description | number: any real number that is used as the exponent of the constant e. |
Description | Returns e raised to the <number> power. |
Output data type | N/A |
Examples | BI_EXP(2) = 7.389 |
BI_FLOOR
BI_FLOOR is used to round down a value.
Syntax | BI_FLOOR(number) |
Description | number: the numeric value to be rounded. |
Description | Rounds down to the greatest integer that is smaller than or equal to a number. |
Output data type | Integer |
Examples | BI_FLOOR(7.9) = 7 |
BI_GREATEST
BI_GREATEST is used to calculate the maximum value in a parameter list.
Syntax | BI_GREATEST(value1, value2, ...) |
Description | value1, value2, ...: n parameters whose maximum values need to be found. |
Description | Returns the maximum value among multiple parameters. Enter at least two parameters. |
Output data type | N/A |
Examples | BI_GREATEST(10, 5, 7) = 10 |
BI_LEAST
BI_LEAST is used to find the minimum value in a parameter list.
Syntax | BI_LEAST(value1, value2, ...) |
Description | value1, value2, ...: n parameters whose minimum values need to be found. |
Description | Returns the minimum value among multiple parameters. Enter at least two parameters. |
Output data type | N/A |
Examples | BI_LEAST(10, 5, 7) = 5 |
BI_POWER
BI_POWER is used to multiply a specified number.
Syntax | BI_POWER(number, power) |
Description | |
Description | Returns the <power> power of <number>. |
Output data type | N/A |
Examples | BI_POWER(5,3) = 125 |
BI_ROUND
BI_ROUND returns a number that is rounded by the specified number of digits.
Syntax | BI_ROUND(number, [decimals]) |
Description | number: the number to be rounded. [decimals]: Rounding by this number of digits. If it is less than 0, it is rounded to the left of the decimal point; if it is equal to 0 or omits decimals, it is rounded to the nearest integer; if it is greater than 0, it is rounded to the specified decimal place.
|
Description | Rounding <number> to the specified number of digits. <decimals> specifies the scale precision of the output result. If decimals is omitted, the output is an integer. |
Output data type | N/A |
Examples | BI_ROUND(1/3, 2) = 0.33 |
BI_SQRT
BI_SQRT is used to find the square root of a value.
Syntax | BI_SQRT(number) |
Description | number: the number of the square root to be obtained. |
Description | Returns the square root of <number>. |
Output data type | N/A |
Examples | BI_SQRT(25) = 5 |
BI_SQUARE
BI_SQUARE is used to square a value.
Syntax | BI_SQUARE(number) |
Description | number: the number to be squared. |
Description | Returns the square of <number>. |
Output data type | N/A |
Examples | BI_SQUARE(5) = 25 |