FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-15
EXP Function
Considerations
Both arguments to DPROD are type real, but the DPROD function result is type
double precision.
The value of DPROD (x, y) is defined as:
DBLE (x) * DBLE (y)
Example of the DPROD Function
REAL cost (100)
DOUBLE PRECISION ttax, tax
ttax = 0
DO 20 j = 1, 100
tax = DPROD (cost (j), .07)
ttax = ttax + tax
20 CONTINUE
EXP Function
The EXP function returns an exponential.
The table below shows the argument and function type for the EXP generic function
and its associated specific functions.
Considerations
The result type of the EXP function is the same as the type of its argument.
For a real or double precision argument x, the value of EXP(x) is
e
x
where e is the natural logarithm base, or approximately
2.71828 18284 59045
For a complex argument z = CMPLX(x, y), the value of EXP(z) is defined as:
CMPLX (EXP(x) * COS(y), EXP(x) * SIN(y))
Syntax Argument Type Function Type
EXP (x)
EXP (x) Real Real
DEXP (x) Double Precision Double Precision
CEXP (x) Complex Complex
x is an arithmetic expression.