Exponents and Logarithms

Exponential, logarithm, power, and root functions


exp Exponential
expm1 Compute exp(x)-1 accurately for small values of x
log Natural logarithm
log10 Common logarithm (base 10)
log1p Compute log(1+x) accurately for small values of x
log2 Base 2 logarithm and dissect floating-point numbers into exponent and mantissa
nextpow2 Exponent of next higher power of 2
nthroot Real nth root of real numbers
pow2 Base 2 power and scale floating-point numbers
reallog Natural logarithm for nonnegative real arrays
realpow Array power for real-only output
realsqrt Square root for nonnegative real arrays
sqrt Square root

Examples and How To

Was this topic helpful?