Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2014 16:15:31 -0700
From:      enh <enh@google.com>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-numerics@freebsd.org
Subject:   Re: lgamma_r and lgammaf_r return the wrong sign for -0.f
Message-ID:  <CAJgzZooGgPWG4RfLntpWmkMjZPHazFtkEOuBrMHtDmWadKYVBw@mail.gmail.com>
In-Reply-To: <20140917190312.GA73699@troutmask.apl.washington.edu>
References:  <CAJgzZopa-d=eR7zkqhffsjMY0NEavhqDA-B3V9bQdaJd6BMO2A@mail.gmail.com> <20140917190312.GA73699@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
thanks. i've moved Android over to your current implementations (and
the ld128 lgammal).

On Wed, Sep 17, 2014 at 12:03 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> On Fri, Sep 12, 2014 at 02:15:37PM -0700, enh via freebsd-numerics wrote:
>> if I pass -0.f to lgammaf_r, the sign returned in *signgamp is 1. this
>> is incorrect --- it should be -1.
>>
>> both lgamma_r and lgammaf_r are affected, but the other special cases
>> in those functions look fine to me.
>>
>> this is fixed in OpenBSD and glibc, but FreeBSD and NetBSD both have
>> the same bug.
>>
>> patch below (whitespace mangled courtesy of gmail). i'd prefer to wait
>> for this to be fixed in FreeBSD and pull down the fix rather than just
>> fix it locally.
>>
>> btw, it looks like you're missing coshl/sinhl/tanhl for ld128 now?
>> (they've been removed from imprecise.c without having ld128
>> implementations added afaics.)
>>
>>  --elliott (Android libc maintainer)
>
> I committed your patch along with the necessary changes to the
> ld80/e_lgamma_r.c and ld128/e_lgamma_r.c.
>
> Thanks for bug report.
>
> --
> Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJgzZooGgPWG4RfLntpWmkMjZPHazFtkEOuBrMHtDmWadKYVBw>