Date: Tue, 14 Dec 2021 15:14:22 -0800 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Warner Losh <imp@bsdimp.com> Cc: Mark Murray <markm@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: What to do about tgammal? Message-ID: <20211214231422.GA51064@troutmask.apl.washington.edu> In-Reply-To: <CANCZdfqgAa76jYGOV8RcqRRacdk-GXUzk-cmS8H45mRAE_=PUw@mail.gmail.com> References: <20211204185352.GA20452@troutmask.apl.washington.edu> <E5711C71-1095-4B6B-A33A-4CDFF123AB62@FreeBSD.org> <20211213022223.GA41440@troutmask.apl.washington.edu> <813F29E3-8478-4282-9518-5943DE7B5492@FreeBSD.org> <20211214215106.GA50381@troutmask.apl.washington.edu> <F63407DF-B7CF-4C7B-86AB-1D99EB6C6FC7@FreeBSD.org> <CANCZdfqgAa76jYGOV8RcqRRacdk-GXUzk-cmS8H45mRAE_=PUw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 14, 2021 at 03:47:17PM -0700, Warner Losh wrote: > On Tue, Dec 14, 2021 at 3:23 PM Mark Murray <markm@freebsd.org> wrote: > > > On 14 Dec 2021, at 21:51, Steve Kargl <sgk@troutmask.apl.washington.edu> > > wrote: > > > Interval max ULP x at Max ULP > > > [6,1755.1] 0.873414 at 1.480588145237629047468e+03 > > > [1.0662,6] 0.861508 at 1.999467927053585410537e+00 > > > [1.01e-17,1.0661] 0.938041 at 1.023286481537296307856e+00 > > > [-1.9999,-1.0001] 3.157770 at -1.246957268051453610329e+00 > > > [-2.9999,-2.0001] 2.987659 at -2.220949465449893090070e+00 > > > > > > Note, 1.01e-17 can be reduced to soemthing like 1.01e-19 or > > > > Extra diffs most welcome! > > > > Those results have allayed my fears. Is 1e-17 sufficient to commit these > changes, or do > we need to work to get it down to 1e-19 for it to be acceptable? > Well, egg-on-the-face. I updated the sloppy limit to isolate x = 0 from 0x1p-56 to use 0x1p-116 and forgot to update my test scripts. The code in tgammal in the interval [-iota:iota] is if (x > iota) RETURNI(smaller_gam(x)); if (x > -iota) { if (x != 0) u.a = 1 - tiny; /* raise inexact */ RETURNI(1 / x); } so tgammal(x) -> 1/x as x -> 0. -- Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211214231422.GA51064>