exp¶
- exp(x: array, /) array ¶
Calculates an implementation-dependent approximation to the exponential function, having domain
[-infinity, +infinity]
and codomain[+0, +infinity]
, for each elementx_i
of the input arrayx
(e
raised to the power ofx_i
, wheree
is the base of the natural logarithm).Special cases
For floating-point operands,
If
x_i
isNaN
, the result isNaN
.If
x_i
is+0
, the result is1
.If
x_i
is-0
, the result is1
.If
x_i
is+infinity
, the result is+infinity
.If
x_i
is-infinity
, the result is+0
.
- Parameters:
x (array) – input array. Should have a floating-point data type.
- Returns:
out (array) – an array containing the evaluated exponential function result for each element in
x
. The returned array must have a floating-point data type determined by Type Promotion Rules.