@@ -373,6 +373,7 @@ libm-test-funcs-auto-static = \
log2 \
log10 \
y0 \
+ y1 \
# libm-test-funcs-auto-static
libm-test-funcs-noauto-static = \
copysign \
@@ -39,11 +39,19 @@ M_DECL_FUNC (__y1) (FLOAT x)
if (__glibc_unlikely (islessequal (x, M_LIT (0.0))))
{
if (x < 0)
- /* Domain error: y1(x<0). */
- __set_errno (EDOM);
+ {
+ /* Domain error: y1(x<0). */
+ __feraiseexcept (FE_INVALID);
+ __set_errno (EDOM);
+ return NAN;
+ }
else if (x == 0)
- /* Pole error: y1(0). */
- __set_errno (ERANGE);
+ {
+ /* Pole error: y1(0). */
+ __feraiseexcept (FE_DIVBYZERO);
+ __set_errno (ERANGE);
+ return -INFINITY;
+ }
}
return M_SUF (__ieee754_y1) (x);
}