Description: | Truncates a value to a whole number. | ||
Class: | Elemental function; Generic | ||
Arguments: | A | Must be of type real. | |
KIND (opt) | Must be a scalar integer initialization expression. | ||
Results: | The result is of type real. If KIND is
present, the kind parameter of the result is that specified by KIND; otherwise,
the kind parameter is that of A.
The result is defined as the largest integer whose magnitude does not exceed the magnitude of A and whose sign is the same as that of A. If |A| is less than 1, AINT (A) has the value zero. |
Specific Name | Argument Type | Result Type |
---|---|---|
AINT | REAL(4) | REAL(4) |
DINT | REAL(8) | REAL(8) |
QINT | REAL(16) | REAL(16) |
Examples
AINT (3.678) has the value 3.0.
AINT (-1.375) has the value -1.0.