VMS Help
CRTL, hypot
*Conan The Librarian
|
Returns the length of the hypotenuse of a right triangle.
Format
#include <math.h>
double hypot (double x, double y);
float hypotf (float x, float y); (Integrity servers, Alpha)
long double hypotl (long double x, long double y);
(Integrity servers, Alpha)
x
A real value.
y
A real value.
The hypot functions return the length of the hypotenuse of a
right triangle, where x and y represent the perpendicular sides
of the triangle. The length is calculated as:
sqrt(x2 + y2)
On overflow, the return value is undefined, and errno is set to
ERANGE.
x The length of the hypotenuse.
HUGE_VAL Overflow occurred; errno is set to ERANGE.
0 Underflow occurred; errno is set to ERANGE.
NaN x or y is NaN; errno is set to EDOM.