octave: Exponents and Logarithms

 
 17.1 Exponents and Logarithms
 =============================
 
  -- : exp (X)
      Compute ‘e^x’ for each element of X.
 
      To compute the matrix exponential, see SeeLinear Algebra.
 
      See also: Seelog XREFlog.
 
  -- : expm1 (X)
      Compute ‘exp (X) - 1’ accurately in the neighborhood of zero.
 
      See also: Seeexp XREFexp.
 
  -- : log (X)
      Compute the natural logarithm, ‘ln (X)’, for each element of X.
 
      To compute the matrix logarithm, see SeeLinear Algebra.
 
DONTPRINTYET       See also: Seeexp XREFexp, Seelog1p XREFlog1p, *notelog2:
DONTPRINTYET       See also: Seeexp XREFexp, Seelog1p XREFlog1p, Seelog2

      XREFlog2, Seelog10 XREFlog10, Seelogspace XREFlogspace.
 
  -- : 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.
 
DONTPRINTYET       See also: Seelog XREFlog, Seerealpow XREFrealpow, *noteDONTPRINTYET       See also: Seelog XREFlog, Seerealpow XREFrealpow, See
      realsqrt XREFrealsqrt.
 
  -- : log1p (X)
      Compute ‘log (1 + X)’ accurately in the neighborhood of zero.
 
DONTPRINTYET       See also: Seelog XREFlog, Seeexp XREFexp, *noteexpm1:
DONTPRINTYET       See also: Seelog XREFlog, Seeexp XREFexp, Seeexpm1

      XREFexpm1.
 
  -- : log10 (X)
      Compute the base-10 logarithm of each element of X.
 
DONTPRINTYET       See also: Seelog XREFlog, Seelog2 XREFlog2, *notelogspace:
DONTPRINTYET       See also: Seelog XREFlog, Seelog2 XREFlog2, Seelogspace

      XREFlogspace, Seeexp XREFexp.
 
  -- : 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’.
 
DONTPRINTYET       See also: Seepow2 XREFpow2, Seelog XREFlog, *notelog10:
DONTPRINTYET       See also: Seepow2 XREFpow2, Seelog XREFlog, Seelog10

      XREFlog10, Seeexp XREFexp.
 
  -- : 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).
 
DONTPRINTYET       See also: Seelog2 XREFlog2, Seenextpow2 XREFnextpow2, *noteDONTPRINTYET       See also: Seelog2 XREFlog2, Seenextpow2 XREFnextpow2, See
      power XREFpower.
 
  -- : 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: Seepow2 XREFpow2, Seelog2 XREFlog2.
 
  -- : 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.
 
DONTPRINTYET       See also: Seepower XREFpower, Seereallog XREFreallog, *noteDONTPRINTYET       See also: Seepower XREFpower, Seereallog XREFreallog, See
      realsqrt XREFrealsqrt.
 
  -- : 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 SeeLinear Algebra.
 
      See also: Seerealsqrt XREFrealsqrt, Seenthroot XREFnthroot.
 
  -- : 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.
 
DONTPRINTYET       See also: Seesqrt XREFsqrt, Seerealpow XREFrealpow, *noteDONTPRINTYET       See also: Seesqrt XREFsqrt, Seerealpow XREFrealpow, See
      reallog XREFreallog.
 
  -- : 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: Seenthroot XREFnthroot.
 
  -- : 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
 
DONTPRINTYET       See also: Seerealsqrt XREFrealsqrt, Seesqrt XREFsqrt, *noteDONTPRINTYET       See also: Seerealsqrt XREFrealsqrt, Seesqrt XREFsqrt, See
      cbrt XREFcbrt.