This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Fix ynl return value with LDBL_MIN
On Mon, 28 May 2012, Carlos O'Donell wrote:
> On Mon, May 28, 2012 at 9:46 AM, Marek Polacek <email@example.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 ?<firstname.lastname@example.org>
> > ? ? ? ?[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.
The testcase is removing the "#ifndef TEST_LDOUBLE" condition and
associated comment added by
<http://sourceware.org/ml/libc-alpha/2012-05/msg01856.html>. In such
cases you can reasonably do one of:
(a) Wait until one patch is in before submitting another.
(b) Submit one patch relative to a tree containing the other (so there is
a dependency for commit, but not for review).
(c) Submit two patches that conflict (so one that adds the conditioned
test, and one that adds the test without condition but only testing the
result and exceptions not the errno setting).
Joseph S. Myers