next up previous contents index
Next: Logical Type Up: Data Types Previous: Double Precision Type

Complex Type

  The complex data type stores two real values as a single entity. There is no double precision complex type in Standard Fortran.

Complex numbers arise naturally when extracting the roots of negative numbers and are used in many branches of mathematics, physics, and engineering. A complex number is often represented as (A + iB), where A and B are the real and imaginary parts respectively and i2 = -1. Electrical engineers, having used the letter i to represent current, use the notation (A + jB) instead.

Although the rules for manipulating complex numbers are straight-forward, it is convenient to have the Fortran system to do the work. It is usually more efficient as well, because the computer can use its internal registers to store the intermediate products in complex arithmetic. Exponentiation and the four regular arithmetic operators can be used on complex values, and various intrinsic functions are also provided such as square-root, logarithms, and the trigonometric functions.



Helen Rowlands
8/27/1998