cc [flag ...] file ... -lm [library ...]#include <math.h>
double hypot(double x, double y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);
sqrt(x * x + y * y)
taking precautions against unwarranted overflows.
On systems that support IEEE NaN, if either argument is a quiet NaN, that value is returned. If either argument is a signaling NaN, a quiet NaN is returned and the invalid operation exception is raised. In either case, errno is set to EDOM. The only exception is that if one argument is a NaN and the other argument is ±, +HUGE_VAL is returned with no error indication.
If the program was compiled with the -Xt compilation mode, a value that will compare equal to HUGE is returned instead of HUGE_VAL. These error handling procedures may be changed with the function matherr.