dotPow

x .^ y

dotPow(x, y)

Try it yourself:

See also:
pow

dotPow(): Element-Wise Powers

dotPow() raises every entry of an array or matrix to a matching exponent. It is useful for squaring residuals, applying per-channel exponents, and nonlinear transforms while preserving shape.

Choose the intended operation

dotPow differs from pow() when collections are involved: it makes entry-by-entry intent explicit. Check shapes with size(). Negative bases with non-integer exponents may not have real results, and zero raised to a negative exponent is undefined.

Pair it with dotMultiply() for weighted transformations or sqrt() for inverse square-root style work. Preserve precision for high powers, which can overflow quickly.

Try Dot Pow in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions