LF Fortran 95

EXP Function

Description

The EXP function returns a REAL or COMPLEX value that is an approximation of the exponential function.

Syntax

EXP (x)

Arguments

x is an INTENT(IN) scalar or array of type REAL or COMPLEX.

Result

The result is of the same type and kind as x. Its value is a REAL or COMPLEX representation of ex.

If x is COMPLEX, its imaginary part is treated as a value in radians.

Example

real :: r=1. complex :: c=(0.,-3.141592654) write(*,*) exp(r) ! writes an approximation of e write(*,*) exp(c) ! writes a complex approximation of -1.