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

Functions

float hypotf (float x, float y)
 Compute hypotenuse. More...
 

Function Documentation

◆ hypotf()

float hypotf ( float  x,
float  y 
)

Compute hypotenuse.

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