The arithmetic built-in functions allow you to do the following:
Table 45 lists the arithmetic built-in functions and a short description of each.
Some of the arithmetic functions derive the data type of their results from one or more arguments. When the data types of the arguments differ, they are converted as described in Data conversion.
| Function | Description |
|---|---|
| ABS | Calculates the absolute value of a value |
| CEIL | Calculates the smallest integer value greater than or equal to a value |
| COMPLEX | Returns the complex number with given real and imaginary parts |
| CONJG | Returns the complex conjugate of a value |
| FLOOR | Calculates the largest integer value less than or equal to a value |
| IMAG | Returns the imaginary part of a complex number |
| MAX | Calculates the maximum of 2 or more values |
| MIN | Calculates the minimum of 2 or more values |
| MOD | Returns the modular equivalent of the remainder of one value divided by another |
| RANDOM | Returns a pseudo-random value |
| REAL | Returns the real part of a complex number |
| REM | Calculates the remainder of one value divided by another |
| ROUND | Rounds a value at a specified digit |
| SIGN | Returns a -1, 0 or 1 if a value is negative, zero, or positive, respectively |
| TRUNC | Calculates the nearest integer for value rounded towards zero |