Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Dec 2021 10:41:14 +0000
From:      Mark Murray <markm@FreeBSD.org>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-hackers@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: What to do about tgammal?
Message-ID:  <6C888EBF-1734-4EDC-8DBF-D2BA2454C37D@FreeBSD.org>
In-Reply-To: <20211218035222.GA68916@troutmask.apl.washington.edu>
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> <20211218035222.GA68916@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_D858C349-81E9-4783-9A72-6F9F7568A1F2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On 18 Dec 2021, at 03:52, Steve Kargl =
<sgk@troutmask.apl.washington.edu> wrote:
>=20
> On Tue, Dec 14, 2021 at 10:21:55PM +0000, Mark Murray 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
>>>=20
>>> Note, 1.01e-17 can be reduced to soemthing like 1.01e-19 or
>>=20
>> Extra diffs most welcome!
>>=20
>=20
> Hi Mark,
>=20
> Don't know if you noticed, but I borroewed a few cpu cycles
> from grimoire.

Didn't notice a thing! :-)

>  My WIP is already better than the imprecise.c
> kludge from theraven@.  I need to work out the details of
> computing logl(x) in extra precision or see if I can leverage
> what Bruce did a few years ago.  Anywho, current results:
>=20
> Interval tested for tgammal: [128,1755]
> count: 1000000
>  xm =3D  1.71195767195767195767195767195767183e+03L
> libm =3D  7.79438030237108165017007606176403036e+4790L
> mpfr =3D  7.79438030237108165017007606175285456e+4790L
> ULP =3D 14869.19517
>=20
> Interval tested for tgammal: [16,128]
> count: 1000000
>  xm =3D  1.27687183687183687183687183687183690e+02L
> libm =3D  6.61421998891483212224382625339007663e+212L
> mpfr =3D  6.61421998891483212224382625338960267e+212L
> ULP =3D 731.00958
>=20
> Interval tested for tgammal: [10,16]
> count: 1000000
>  xm =3D  1.54261654261654261654261654261654251e+01L
> libm =3D  2.74203137295418912508367515208072654e+11L
> mpfr =3D  2.74203137295418912508367515208073861e+11L
> ULP =3D 45.61161
>=20
> Interval tested for tgammal: [1.2446e-60,10]
> count: 1000000
>  xm =3D  6.26200626138006138006138006138006065e-02L
> libm =3D  1.54507103764516989381203274093299079e+01L
> mpfr =3D  1.54507103764516989381203274093299091e+01L
> ULP =3D 0.76751

Hmm. I think my understanding of ULP is missing something?

I thought that ULP could not be greater than the mantissa size
in bits?

I.e., I thought it represents average rounding error (compared with
"perfect rounding"), not truncation error, as the above very large
ULPs suggest.

M
--
Mark R V Murray


--Apple-Mail=_D858C349-81E9-4783-9A72-6F9F7568A1F2
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2
Comment: GPGTools - http://gpgtools.org

iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAmG9usoACgkQQlsJDh9C
UqA2bwf/aSpM0ZVX02od/89cMjwD+Hy5U4QemDhs+qHx0hPQn/Ry5SyEEeqjAJrA
lde6OSxRhX3wBc5i/eN7vXdTz1WVj8C/QboXx0pkOBvVMOrb/9CpD5und8EIdekf
f5QixS6vqXURjgLqRCdmOViCfG58KF+BcLJHZAtwl1EwoVTo28H/o+gx+2iA84oT
qknObY4tKpMFqi5I5l7mmv7T/1Kiiwbe56KGAHvAMBY3u2048mOZpTGxJ/4qfSJI
D/ZZLu51KAVx6mp8gRqUObxVoUpaUpYY8v1C/1Qbegmc7GGPnzcQPV28SWtB6kSw
D3jkwnsxc1+GcIvHkFG2WE9Spaq5+w==
=gzh1
-----END PGP SIGNATURE-----

--Apple-Mail=_D858C349-81E9-4783-9A72-6F9F7568A1F2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C888EBF-1734-4EDC-8DBF-D2BA2454C37D>