Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

COMPLEX(4) Constants

A COMPLEX(4) constant is a pair of integer or single-precision real constants that represent a complex number.

A COMPLEX(4) constant occupies eight bytes of memory and is interpreted as a complex number.

If the real and imaginary part of a complex literal constant are both real, the kind parameter value is that of the part with the greater decimal precision.

The rules for REAL(4) constants apply to REAL(4) constants used in COMPLEX constants. (See General Rules for Complex Constants and REAL(4) Constants for the rules on forming REAL(4) constants.)

The REAL(4) constants in a COMPLEX constant have IEEE* binary32 format.

Note that compiler option real-size can affect COMPLEX data.

Examples

Valid COMPLEX(4) Constants

(1.7039,-1.70391)

(44.36_4,-12.2E16_4)

(+12739E3,0.)

(1,2)

Invalid COMPLEX(4) Constants

(1.23,)

Missing second integer or single-precision real constant.

(1.0, 2H12)

Hollerith constant not allowed.