Elemental Intrinsic Function (Generic): Computes an exponential value.
Syntax
Results:
The result type is the same as x. The value of the result is ex. If x is of type complex, its imaginary part is regarded as a value in radians.
Specific Name | Argument Type | Result Type |
---|---|---|
EXP | REAL(4) | REAL(4) |
DEXP | REAL(8) | REAL(8) |
QEXP 1 | REAL(16) | REAL(16) |
CEXP 2 | COMPLEX(4) | COMPLEX(4) |
CDEXP 3 | COMPLEX(8) | COMPLEX(8) |
CQEXP 1 | COMPLEX(16) | COMPLEX(16) |
1 VMS and U*X
2 The setting of compiler option /real_size can affect CEXP. 3 This function can also be specified as ZEXP. |
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: LOG
Examples
EXP (2.0) has the value 7.389056.
EXP (1.3) has the value 3.669297.
The following shows another example:
! Given initial size and growth rate,
! calculates the size of a colony at a given time.
REAL sizei, sizef, time, rate
sizei = 10000.0
time = 40.5
rate = 0.0875
sizef = sizei * EXP (rate * time)
WRITE (*, 100) sizef
100 FORMAT (' The final size is ', E12.6)
END