exp(z) Returns the number e raised to the power z.
log(z, [b]) Returns the base b logarithm of z. If b
is omitted, returns base 10 log of z.
ln(z) Returns the natural logarithm
(base e) of z.
ln0(z) Returns the natural logarithm
(base e) of z, but returns
−1 × 10307 at z
= 0. Using ln0 is useful inside optimzation routines, where the value
of the argument can't be bounded to avoid the asymptote.
Arguments:
z must be a dimensionless
scalar (real, complex, or imaginary), or a vector of scalars. For log
and ln functions, z cannot be zero.
b (optional) is a positive,
real scalar. If omitted, b is assumed to be 10.
Notes:
For complex z, the log
functions return values from the principal branch of these functions.
In other words: ln(z) = ln(|z|) + i arg(z).
The exp function is equivalent to raising e
to a power, but these both use a different algorithm than standard exponentiation.
For very large or small values in the exponent, this algorithm is more robust,
avoiding numerical roundoff errors. The most accurate values for very large
arguments can be found by using symbolic
evaluation of exp(x) with a decimal
argument, for example, exp(1.0) → 2.7182818284590452354.