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

Functions

long double hypotl (long double x, long double y)
 Compute hypotenuse. More...
 

Function Documentation

◆ hypotl()

long double hypotl ( long double  x,
long double  y 
)

Compute hypotenuse.

The hypotl 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 hypotl functions return √(x^2+y^2).