(octave.info)Exponents and Logarithms
17.1 Exponents and Logarithms
=============================
-- : exp (X)
Compute ‘e^x’ for each element of X.
To compute the matrix exponential, see Note: Linear Algebra.
See also: Note: log.
-- : expm1 (X)
Compute ‘exp (X) - 1’ accurately in the neighborhood of zero.
See also: Note: exp.
-- : log (X)
Compute the natural logarithm, ‘ln (X)’, for each element of X.
To compute the matrix logarithm, see Note: Linear Algebra.
See also: Note: exp, Note: log1p, *note log2:
XREFlog2, Note: log10, Note: logspace.
-- : reallog (X)
Return the real-valued natural logarithm of each element of X.
If any element results in a complex return value ‘reallog’ aborts
and issues an error.
See also: Note: log, Note: realpow, Note:
realsqrt.
-- : log1p (X)
Compute ‘log (1 + X)’ accurately in the neighborhood of zero.
See also: Note: log, Note: exp, *note expm1:
XREFexpm1.
-- : log10 (X)
Compute the base-10 logarithm of each element of X.
See also: Note: log, Note: log2, *note logspace:
XREFlogspace, Note: exp.
-- : log2 (X)
-- : [F, E] = log2 (X)
Compute the base-2 logarithm of each element of X.
If called with two output arguments, split X into binary mantissa
and exponent so that ‘1/2 <= abs(f) < 1’ and E is an integer. If
‘x = 0’, ‘f = e = 0’.
See also: Note: pow2, Note: log, *note log10:
XREFlog10, Note: exp.
-- : pow2 (X)
-- : pow2 (F, E)
With one input argument, compute 2 .^ x for each element of X.
With two input arguments, return f .* (2 .^ e).
See also: Note: log2, Note: nextpow2, Note:
power.
-- : nextpow2 (X)
Compute the exponent for the smallest power of two larger than the
input.
For each element in the input array X, return the first integer N
such that 2^n ≥ abs (x).
See also: Note: pow2, Note: log2.
-- : realpow (X, Y)
Compute the real-valued, element-by-element power operator.
This is equivalent to ‘X .^ Y’, except that ‘realpow’ reports an
error if any return value is complex.
See also: Note: power, Note: reallog, Note:
realsqrt.
-- : sqrt (X)
Compute the square root of each element of X.
If X is negative, a complex result is returned.
To compute the matrix square root, see Note: Linear Algebra.
See also: Note: realsqrt, Note: nthroot.
-- : realsqrt (X)
Return the real-valued square root of each element of X.
If any element results in a complex return value ‘realsqrt’ aborts
and issues an error.
See also: Note: sqrt, Note: realpow, Note:
reallog.
-- : cbrt (X)
Compute the real cube root of each element of X.
Unlike ‘X^(1/3)’, the result will be negative if X is negative.
See also: Note: nthroot.
-- : nthroot (X, N)
Compute the real (non-complex) N-th root of X.
X must have all real entries and N must be a scalar. If N is an
even integer and X has negative entries then ‘nthroot’ aborts and
issues an error.
Example:
nthroot (-1, 3)
⇒ -1
(-1) ^ (1 / 3)
⇒ 0.50000 - 0.86603i
See also: Note: realsqrt, Note: sqrt, Note:
cbrt.
automatically generated by info2www version 1.2.2.9