Re: issue with tgammaf

Paul Zimmermann <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
       Dear Keith,

> Are you able to share the code which performs these tests? I'd love to
> be able to run these on a regular basis to ensure that no regressions
> occur as we maintain the code.

I will send you privately the code, since it is not yet ready for a wide
distribution.

> > tgamma:
> > Total: errors=2028164922 (47.41%) errors2=1833526367 maxerr=2.39e+02 ulp(s)
> > Total: errors=2026865970 (47.38%) errors2=1832940352 maxerr=2.39e+02 ulp(s)
> 
> Given that around half of the possible input values (> 35, or near
> negative integers) generate an overflow, it seems like tgamma
> essentially *never* gives us an accurate finite result...

on a sample of 1/1000 of all values, it appears most errors come from exponents
(ilogbf) between -64 and -7. For example with exponent -64 I get no incorrect
rounding with glibc-2.32 out of 16776 samples, but 16410 with newlib.

For example for x=0x1.00e8p-64 newlib gives 0x1.fe31d6p+63 whereas the correct
rounding is 0x1.fe31a4p+63 according to MPFR.

Best regards,
Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.