FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-6
AIMAG Function
AIMAG Function
The AIMAG function returns the imaginary part of a complex number.
z
is a complex expression
Considerations
The AIMAG function returns the imaginary part of a complex number. Its type is always
real. That is, if
z = CMPLX (x, y)
then,
AIMAG (z) = y
Example of the AIMAG Function
In the following example, if the value (4E3,-2.1) is read into XNUMBER, the value -2.1
is stored in Y.
COMPLEX xnumber
READ (*, *) xnumber
y = AIMAG (xnumber)
AINT Function
The AINT function returns the non-fractional part of a number.
The table below shows the argument and function type of the AINT generic function
and of its associated specific function.
Considerations
The result type of the AINT function is the same as the type of its argument.
If the absolute value of x is less than 1.0, AINT returns zero.
AIMAG ( z)
Syntax Argument Type Function Type
AINT (x)
AINT (x) Real Real
DINT (x) Double Precision Double Precision
x is an arithmetic expression.