Skip to content

hypot

Square root of sum of squares (numerically stable).

C = hypot(A, B)

Returns sqrt(A.^2 + B.^2) computed in a way that avoids overflow when either argument is large or underflow when both are small. Common in computing 2D distances and amplitudes.

hypot(3, 4) % 5
  • norm — Vector or matrix norm.
  • sqrt — Square root.