Next: , Previous: AIMAG, Up: Intrinsic Procedures


8.9 AINT — Imaginary part of complex number

Description:
AINT(X [, KIND]) truncates its argument to a whole number.
Option:
f95, gnu
Class:
elemental function
Syntax:
X = AINT(X) X = AINT(X, KIND)
Arguments:

X The type of the argument shall be REAL(*).
KIND (Optional) KIND shall be a scalar integer initialization expression.

Return value:
The return value is of type real with the kind type parameter of the argument if the optional KIND is absent; otherwise, the kind type parameter will be given by KIND. If the magnitude of X is less than one, then AINT(X) returns zero. If the magnitude is equal to or greater than one, then it returns the largest whole number that does not exceed its magnitude. The sign is the same as the sign of X.
Example:
          program test_aint
            real(4) x4
            real(8) x8
            x4 = 1.234E0_4
            x8 = 4.321_8
            print *, aint(x4), dint(x8)
            x8 = aint(x4,8)
          end program test_aint
     

Specific names:

Name Argument Return type Option
DINT(X) REAL(8) X REAL(8) f95, gnu