XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Hypot_sub()

Sub Hypot_sub ( Ret As  Double,
X As  Double,
Y As  Double,
Optional Info As  Long 
)

Square root of a square sum (hypotenuse) (Subroutine version)

Purpose
Computes the square root of the square sum of two arguments x and y, or the length of the hypotenuse of a right-angle triangle. It is designed to avoid the possible overflow and underflow errors.
Parameters
[out]RetSquare root of the square sum of x and y (sqrt(x^2 + y^2)).
[in]XArgument x.
[in]YArgument x.
[out]Info(Optional)
= 0: Successful exit.
= 1: Floating point range error.