[PATCH] Fix ynl return value with LDBL_MIN

Carlos O'Donell carlos@systemhalted.org
Mon May 28 16:34:00 GMT 2012


On Mon, May 28, 2012 at 9:46 AM, Marek Polacek <polacek@redhat.com> wrote:
> ynl (5, LDBL_MIN) should, like yn (5, DBL_MIN) and ynf (5, FLT_MIN),
> return -Inf, rather than NaN.  This happens in __ieee754_ynl because
> GET_LDOUBLE_WORDS sign-extends the sign-exponent (so we get 0xffffffff
> instead of 0xffff, thus IIUC the loop cycles longer than it should and
> the result is NaN).
> I can prepare a test, if wanted.
>
> Regtested on x86_64-linux, ok for trunk if passes testsuite?
>
> 2012-05-28  Marek Polacek  <polacek@redhat.com>
>
>        [BZ #14173]
>        * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_ynl): Correct
>        loop condition.

Please prepare a testcase for this. We need to be serious about
preventing regressions with these kinds of fixes.

Cheers,
Carlos.



More information about the Libc-alpha mailing list