diff options
Diffstat (limited to 'sysdeps/i386/fpu/e_hypot.c')
-rw-r--r-- | sysdeps/i386/fpu/e_hypot.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/e_hypot.c b/sysdeps/i386/fpu/e_hypot.c index aa49d42881..90a245e01f 100644 --- a/sysdeps/i386/fpu/e_hypot.c +++ b/sysdeps/i386/fpu/e_hypot.c @@ -29,7 +29,7 @@ hypot implementation, since internal multiplication and sqrt is carried with 80-bit FP type. */ double -__ieee754_hypot (double x, double y) +__hypot (double x, double y) { if (!isfinite (x) || !isfinite (y)) { @@ -43,6 +43,15 @@ __ieee754_hypot (double x, double y) long double ly = y; double r = math_narrow_eval ((double) sqrtl (lx * lx + ly * ly)); math_check_force_underflow_nonneg (r); + if (isinf (r)) + __set_errno (ERANGE); return r; } +strong_alias (__hypot, __ieee754_hypot) +#if LIBM_SVID_COMPAT +versioned_symbol (libm, __hypot, hypot, GLIBC_2_35); libm_alias_finite (__ieee754_hypot, __hypot) +libm_alias_double_other (__hypot, hypot) +#else +libm_alias_double (__hypot, hypot) +#endif |