FORTRAN 77 Language Reference

DOUBLE COMPLEX

The DOUBLE COMPLEX @ statement specifies the type to be double complex. It optionally specifies array dimensions and size, and initializes with values.

DOUBLE COMPLEX v[/c/] [, v[/c/] ...

Parameter 

Description 

v

Name of a symbolic constant, variable, array, array declarator, function, or dummy function  

c

List of constants for the immediately preceding name  

Description

The declaration can be: DOUBLE COMPLEX or COMPLEX*16.

DOUBLE COMPLEX @

For a declaration such as DOUBLE COMPLEX Z, the variable Z is two REAL*8 elements contiguous in memory, interpreted as one double-width complex number.

If you do not specify the size, a default size is used.

The default size, for a declaration such as DOUBLE COMPLEX Z, can be altered by compiling with any of the options -dbl, -r8, or -xtypemap. See the discussion in Chapter 2 for details.

COMPLEX*16 @

For a declaration such as COMPLEX*16 Z, the variable Z is always two REAL*8 elements contiguous in memory, interpreted as one double-width complex number.

Comments

There is a double-complex version of each complex built-in function. Generally, the specific function names begin with Z or CD instead of C, except for the two functions, DIMAG and DREAL, which return a real value. Examples are: SIN(), CSIN(), CDSIN().

Example: Double-complex scalars and arrays:


       DOUBLE COMPLEX U, V 
       DOUBLE COMPLEX W(3,6) 
       COMPLEX*16 X, Y(5,5)
       COMPLEX  U*16(5), V(5)*16