Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Arithmetic built-in functions

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.

Table 45. Arithmetic built-in functions
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

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)