Message ID | 1486754895-29612-1-git-send-email-gftg@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Fri, 10 Feb 2017, Gabriel F. T. Gomes wrote: > The Bessel functions of the second type (Yn) are not defined for > negative input and should return NAN with the "invalid" exception > raised, in these cases. However, current code checks for infinity and > return zero, regardless of the sign. This error is exposed for long > double when linking with -lieee. Without this flag, the error is not > exposed, because the wrappers for these functions, which use > __kernel_standard functionality, return the correct value. > > Tested for powerpc64le. OK. > [BZ 21130] Note that there is a # before the bug number in the ChangeLog syntax, "[BZ #21130]".
On Fri, 10 Feb 2017 20:55:13 +0000 Joseph Myers <joseph@codesourcery.com> wrote: > On Fri, 10 Feb 2017, Gabriel F. T. Gomes wrote: > > > The Bessel functions of the second type (Yn) are not defined for > > negative input and should return NAN with the "invalid" exception > > raised, in these cases. However, current code checks for infinity and > > return zero, regardless of the sign. This error is exposed for long > > double when linking with -lieee. Without this flag, the error is not > > exposed, because the wrappers for these functions, which use > > __kernel_standard functionality, return the correct value. > > > > Tested for powerpc64le. > > OK. > > > [BZ 21130] > > Note that there is a # before the bug number in the ChangeLog syntax, > "[BZ #21130]". > Thanks. Pushed with this change as b987917e6aa7.
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c index d711007..855b5a5 100644 --- a/sysdeps/ieee754/ldbl-128/e_j0l.c +++ b/sysdeps/ieee754/ldbl-128/e_j0l.c @@ -829,12 +829,7 @@ _Float128 _Float128 xx, xinv, z, p, q, c, s, cc, ss; if (! isfinite (x)) - { - if (x != x) - return x + x; - else - return 0; - } + return 1 / (x + x * x); if (x <= 0) { if (x < 0) diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c index 9e78230..db8dca0 100644 --- a/sysdeps/ieee754/ldbl-128/e_j1l.c +++ b/sysdeps/ieee754/ldbl-128/e_j1l.c @@ -847,12 +847,7 @@ __ieee754_y1l (_Float128 x) _Float128 xx, xinv, z, p, q, c, s, cc, ss; if (! isfinite (x)) - { - if (x != x) - return x + x; - else - return 0; - } + return 1 / (x + x * x); if (x <= 0) { if (x < 0)