MicrOS
hypot.c File Reference
#include "../math.h"

Functions

double hypot (double x, double y)
 Compute hypotenuse. More...
 

Function Documentation

◆ hypot()

double hypot ( double  x,
double  y 
)

Compute hypotenuse.

The hypot functions compute the square root of the sum of the squares of x and y, without undue overflow or underflow. A range error may occur.

Parameters
xFloating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed.
yFloating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed.
Returns
The hypot functions return √(x^2+y^2).