This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix ynl return value with LDBL_MIN
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 28 May 2012 10:00:04 -0400
- Subject: Re: [PATCH] Fix ynl return value with LDBL_MIN
- References: <20120528134625.GD3030@redhat.com>
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.