Date: Wed, 17 Sep 2014 12:03:12 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: enh <enh@google.com> Cc: freebsd-numerics@freebsd.org Subject: Re: lgamma_r and lgammaf_r return the wrong sign for -0.f Message-ID: <20140917190312.GA73699@troutmask.apl.washington.edu> In-Reply-To: <CAJgzZopa-d=eR7zkqhffsjMY0NEavhqDA-B3V9bQdaJd6BMO2A@mail.gmail.com> References: <CAJgzZopa-d=eR7zkqhffsjMY0NEavhqDA-B3V9bQdaJd6BMO2A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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?20140917190312.GA73699>