exp(x): Exponencial¶
Função Exponencial.
Declaration¶
Sintaxe¶
retval = exp(x)
elemental real function exp(x)
Argumentos¶
x
the input value must be of type real or complex.
Valores de retorno¶
The return value is of same type as of the input argument, x
.
Descrição¶
exp(x) computes the base \(e\) exponential of x
, i.e., \(e^x\).
If x
is of type complex, its imaginary part is considered as a value in
radians.
Tipos¶
Supported argument types is real and complex.
interface exp
module procedure sexp, dexp, cexp, zexp
end interface
contains
elemental real(sp) function sexp(x)
real(sp), intent(in) :: x
end function
elemental real(dp) function dexp(x)
real(dp), intent(in) :: x
end function
elemental complex(sp) function cexp(x)
complex(sp), intent(in) :: x
end function
elemental complex(dp) function zexp(x)
complex(dp), intent(in) :: x
end function
Exemplos¶
program intrinsics_exp
print *, exp(0.5)
end program
Resultado:
1.64872