DOUBLE COMPLEX

Statement: Specifies the DOUBLE COMPLEX data type.

Syntax

DOUBLE COMPLEX

A COMPLEX(8) or DOUBLE COMPLEX constant is a pair of constants that represents a complex number. One of the pair must be a double-precision real constant, the other can be an integer, single-precision real, or double-precision real constant.

A COMPLEX(8) or DOUBLE COMPLEX constant occupies 16 bytes of memory and is interpreted as a complex number.

The rules for DOUBLE PRECISION (REAL(8)) constants also apply to the double precision portion of COMPLEX(KIND=8) or DOUBLE COMPLEX constants. (For more information, see REAL and DOUBLE PRECISION.)

The DOUBLE PRECISION constants in a COMPLEX(8) or DOUBLE COMPLEX constant have IEEE* T_floating format.

See Also

General Rules for Complex Constants, COMPLEX Statement, Complex Data Types, DOUBLE PRECISION, REAL

Examples

DOUBLE COMPLEX vector, arrays(7,29)
DOUBLE COMPLEX pi, pi2 /3.141592654,6.283185308/

The following examples demonstrate valid and invalid COMPLEX(KIND=8) or DOUBLE COMPLEX constants:

Valid
(1.7039,-1.7039D0)
(547.3E0_8,-1.44_8)
(1.7039E0,-1.7039D0)
(+12739D3,0.D0)
Invalid Explanation
(1.23D0,) Second constant missing.
(1D1,2H12) Hollerith constants not allowed.
(1,1.2) Neither constant is DOUBLE PRECISION; this is a valid single-precision real constant.