exp
Exponential function
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
For the exp
function in MATLAB^{®}, see exp
.
exp(x
)
exp(x)
represents the value of the exponential
function at the point x.
The exponential function is defined for all complex arguments.
For most exact arguments, an unevaluated function call is returned subject to some simplifications:
Calls of the form with integer or rational q are rewritten such that q lies in the interval . Explicit results are returned if the denominator of q is 1, 2, 3, 4, 5, 6, 8, 10, or 12.
Further, the following special values are implemented: , , .
A call of the form with
an unevaluated ln(y) and
a constant c (i.e.,
of type Type::Constant
)
yields the result y^{c}.
The call yields
the result ,
if f is lambertW
.
Floating point results are computed, when the argument is a floatingpoint number.
Numerical exceptions may happen, when the absolute value of
the real part of a floatingpoint argument x is
large. If ℜ(x)
<  7.4 10^{8},
then exp(x)
may return the truncated result 0.0
(protection
against underflow). If ℜ(x)
> 7.4 10^{8},
then exp(x)
may return the floatingpoint equivalent RD_INF of infinity
. See Example 2.
For arguments of type DOM_INTERVAL
, the return value is another
interval containing the image set of the exponential function over
the input interval. See Example 4.
The protected identifier E
is an alias for exp(1)
.
When called with a floatingpoint argument, the function is
sensitive to the environment variable DIGITS
which determines
the numerical working precision.
We demonstrate some calls with exact and symbolic input data:
exp(1), exp(2), exp(3), exp(1/4), exp(1 + I), exp(x^2)
Floating point values are computed for floatingpoint arguments:
exp(1.23), exp(4.5 + 6.7*I), exp(1.0/10^20), exp(123456.7)
Some special symbolic simplifications are implemented:
exp(I*PI), exp(x  22*PI*I), exp(3 + I*PI)
exp(ln(2)), exp(ln(x)*PI), exp(lambertW(5))
The truncated result 0.0
may be returned
for floatingpoint arguments with negative real parts. This prevents
numerical underflow:
exp(742261118.6)
exp(744261118.7)
exp(742261118.6 + 10.0^10*I), exp(744261118.7 + 10.0^10*I)
When internal numerical overflow occurs, the floatingpoint
equivalent RD_INF of infinity
is returned:
exp(744261117.2)
exp(744261117.3)
System functions such as limit
, series
, expand
, combine
etc. handle expressions involving exp
:
limit(x*exp(x), x = infinity), series(exp(x/(x + 1)), x = 0)
expand(exp(x + y + (sqrt(2) + 5)*PI*I))
combine(%, exp)
exp
transforms intervals (of type DOM_INTERVAL
)
to intervals:
exp(1 ... 1)
Note that the MuPAD^{®} floatingpoint numbers cannot be arbitrarily large. In the context of floatingpoint intervals, all values larger than a machinedependent constant are regarded as “infinite”:
exp(1 ... 1e1000)
Finally, we would like to mention that you can also use exp
on
disjunct unions of intervals:
exp((1 ... PI) union (10 ... 20))

Arithmetical expression or a floatingpoint interval
x