Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Dec 2021 11:15:53 +0100
From:      Marc Fonvieille <blackend@freebsd.org>
To:        Mark Murray <markm@freebsd.org>
Cc:        Steve Kargl <sgk@troutmask.apl.washington.edu>, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: What to do about tgammal?
Message-ID:  <YcBX2cAxi%2B9gBDiW@emphyrio.blackend.org>
In-Reply-To: <8011E549-1DEE-4B1B-BCC9-4604E155F4DC@FreeBSD.org>
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> <6C888EBF-1734-4EDC-8DBF-D2BA2454C37D@FreeBSD.org> <20211218175151.GA71197@troutmask.apl.washington.edu> <8011E549-1DEE-4B1B-BCC9-4604E155F4DC@FreeBSD.org>

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

--xCByWbMwccz7wm2s
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Le 18.12.2021 17:59, Mark Murray a =E9crit :
>=20
>=20
> > On 18 Dec 2021, at 17:51, Steve Kargl <sgk@troutmask.apl.washington.edu=
> wrote:
> >=20
> > On Sat, Dec 18, 2021 at 10:41:14AM +0000, Mark Murray wrote:
> >>=20
> >> Hmm. I think my understanding of ULP is missing something?
> >>=20
> >> I thought that ULP could not be greater than the mantissa size
> >> in bits?
> >>=20
> >> I.e., I thought it represents average rounding error (compared with
> >> "perfect rounding"), not truncation error, as the above very large
> >> ULPs suggest.
> >>=20
> >=20
> > The definition of ULP differs according which expert you
> > choose to follow. :-)  For me (a non-expert), ULP is measured
> > in the system of the "accurate answer", which is assumed to
> > have many more bits of precision than the "approximate answer".
> > From a very old das@ email and for long double I have
>=20
> <snip>
>=20
> Thank you!
>=20
> I checked the definition that I was used to, and it is roughly
> "how many bits of the mantissa are inaccurate (because of
> rounding error)".
>

Hi,

ULP (Unit in the last place) is at first the weight of the least
significant bit of the mantissa.  E.g., in IEEE 754 single precision =3D
2^-23.
It can also be seen as the distance between 2 consecutive significands
(which is not the distance between 2 consecutive floating numbers).
Some people, use ULP (or number of ULP) as Units (plural) in the Last
Place to show the number of bits in error in the least significant bits
of the significand.
I assume what Steve is talking about is the corresponding value in
decimal of the number of ULP.

This thread is really interesting (even if I'm loosely following it).

> I can see how both work. For utterly massive numbers like
> from Gamma(), I can see how accounting for a much larger
> range works.
>=20
> It still feels slightly tricky, as e.g. how many digits after the
> floating point do you account for?
>=20
> > I don't print out the hex representation in ld128, but you see
> > the number of correct decimal digits is 33 digits compared to
> > 36.
>=20
> Looking good!
>=20
> M
> --
> Mark R V Murray
>=20



--=20
Marc

--xCByWbMwccz7wm2s
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQRV00iDSgSCiqE5pc/ND1HAT4506AUCYcBX0wAKCRDND1HAT450
6MesAJ9hTi3dMFzFfLKQC7S8/sAwqKeudwCdEKjMYEmLttjWsFBx4mM0/L2y3JE=
=Rz1J
-----END PGP SIGNATURE-----

--xCByWbMwccz7wm2s--



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