Visible to Intel only — GUID: GUID-6C150677-D799-4918-9EB0-6C3C122E7440
Visible to Intel only — GUID: GUID-6C150677-D799-4918-9EB0-6C3C122E7440
EXP
Elemental Intrinsic Function (Generic): Computes an exponential value.
result = EXP (x)
x |
(Input) Must be of type real or complex. |
Results
The result type and kind are the same as x. The value of the result is e x. 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 |
REAL(16) |
REAL(16) |
CEXP 1 |
COMPLEX(4) |
COMPLEX(4) |
CDEXP2 |
COMPLEX(8) |
COMPLEX(8) |
CQEXP |
COMPLEX(16) |
COMPLEX(16) |
1The setting of compiler options specifying real size can affect CEXP. 2This function can also be specified as ZEXP. |
Example
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