diff --git a/base/math.jl b/base/math.jl index 820c728a86165..9a5e5377cf613 100644 --- a/base/math.jl +++ b/base/math.jl @@ -639,6 +639,8 @@ The article is available online at ArXiv at the link Compute the hypotenuse ``\\sqrt{\\sum |x_i|^2}`` avoiding overflow and underflow. +See also `norm` in the [`LinearAlgebra`](@ref man-linalg) standard library. + # Examples ```jldoctest; filter = r"Stacktrace:(\\n \\[[0-9]+\\].*)*" julia> a = Int64(10)^10; @@ -660,6 +662,11 @@ julia> hypot(-5.7) julia> hypot(3, 4im, 12.0) 13.0 + +julia> using LinearAlgebra + +julia> norm([a, a, a, a]) == hypot(a, a, a, a) +true ``` """ hypot(x::Number) = abs(float(x))