다음: , 상위 문서: Arithmetic   [차례][찾아보기]


17.1 Exponents and Logarithms

exp (가로)

Compute e^x for each element of 가로.

To compute the matrix exponential, see Linear Algebra.

같이 보기: log.

expm1 (가로)

Compute exp (가로) - 1 accurately in the neighborhood of zero.

같이 보기: exp.

log (가로)

Compute the natural logarithm, ln (가로), for each element of 가로.

To compute the matrix logarithm, see Linear Algebra.

같이 보기: exp, log1p, log2, log10, logspace.

reallog (가로)

Return the real-valued natural logarithm of each element of 가로.

If any element results in a complex return value reallog aborts and issues an error.

같이 보기: log, realpow, realsqrt.

log1p (가로)

Compute log (1 + 가로) accurately in the neighborhood of zero.

같이 보기: log, exp, expm1.

log10 (가로)

Compute the base-10 logarithm of each element of 가로.

같이 보기: log, log2, logspace, exp.

log2 (가로)
[f, e] = log2 (가로)

Compute the base-2 logarithm of each element of 가로.

If called with two output arguments, split 가로 into binary mantissa and exponent so that 1/2 <= abs(f) < 1 and e is an integer. If x = 0, f = e = 0.

같이 보기: pow2, log, log10, exp.

pow2 (가로)
pow2 (f, e)

With one input argument, compute 2 .^ x for each element of 가로.

With two input arguments, return f .* (2 .^ e).

같이 보기: log2, nextpow2, power.

n = nextpow2 (가로)

Compute the exponent for the smallest power of two larger than the input.

For each element in the input array 가로, return the first integer n such that 2^n ≥ abs (x).

같이 보기: pow2, log2.

realpow (가로, 세로)

Compute the real-valued, element-by-element power operator.

This is equivalent to 가로 .^ 세로, except that realpow reports an error if any return value is complex.

같이 보기: power, reallog, realsqrt.

sqrt (가로)

Compute the square root of each element of 가로.

If 가로 is negative, a complex result is returned.

To compute the matrix square root, see Linear Algebra.

같이 보기: realsqrt, nthroot.

realsqrt (가로)

Return the real-valued square root of each element of 가로.

If any element results in a complex return value realsqrt aborts and issues an error.

같이 보기: sqrt, realpow, reallog.

cbrt (가로)

Compute the real cube root of each element of 가로.

Unlike x^(1/3), the result will be negative if 가로 is negative.

같이 보기: nthroot.

nthroot (가로, n)

Compute the real (non-complex) n-th root of 가로.

가로 must have all real entries and n must be a scalar. If n is an even integer and 가로 has negative entries then nthroot aborts and issues an error.

Example:

nthroot (-1, 3)
⇒ -1
(-1) ^ (1 / 3)
⇒ 0.50000 - 0.86603i

같이 보기: realsqrt, sqrt, cbrt.


다음: , 상위 문서: Arithmetic   [차례][찾아보기]