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

ID 767251
Date 7/13/2023
Public

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

Document Table of Contents

DCMPLX

Elemental Intrinsic Function (Specific): Converts the argument to double complex type. This function cannot be passed as an actual argument.

result = DCMPLX (x[,y])

x

(Input) Must be of type integer, real, or complex.

y

(Input; optional) Must be of type integer or real. It must not be present if x is of type complex.

Results

The result type is double complex (COMPLEX(8) or COMPLEX*16).

If only one noncomplex argument appears, it is converted into the real part of the result value and zero is assigned to the imaginary part. If y is not specified and x is complex, the result value is CMPLX(REAL( x), AIMAG( x)).

If two noncomplex arguments appear, the complex value is produced by converting the first argument into the real part of the value, and converting the second argument into the imaginary part.

DCMPLX( x, y) has the complex value whose real part is REAL( x, KIND=8) and whose imaginary part is REAL( y, KIND=8).

Example

DCMPLX (-3) has the value (-3.0, 0.0).

DCMPLX (4.1, 2.3) has the value (4.1, 2.3).