When to use `std::hypot(x,y)` over `std::sqrt(x*x + y*y)`
The answer is in the documentation you quoted Computes the square root of the sum of the squares of x and y, without undue overflow or underflow at intermediate stages of the computation. If x*x + y*y overflows, then if you carry out the calculation manually, you’ll get the wrong answer. If you use std::hypot, …