Date: Sat, 18 Dec 2021 17:59:42 +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: <8011E549-1DEE-4B1B-BCC9-4604E155F4DC@FreeBSD.org> In-Reply-To: <20211218175151.GA71197@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> <6C888EBF-1734-4EDC-8DBF-D2BA2454C37D@FreeBSD.org> <20211218175151.GA71197@troutmask.apl.washington.edu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] > On 18 Dec 2021, at 17:51, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote: > > On Sat, Dec 18, 2021 at 10:41:14AM +0000, Mark Murray wrote: >> >> 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. >> > > 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 <snip> Thank you! 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)". I can see how both work. For utterly massive numbers like from Gamma(), I can see how accounting for a much larger range works. It still feels slightly tricky, as e.g. how many digits after the floating point do you account for? > 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. Looking good! M -- Mark R V Murray [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAmG+IY4ACgkQQlsJDh9C UqDfZggAnbSAQEULcHYiEtSHmmFl3QopLwmRz2Ut6beEHD8olyv/PuqY/zh1aq99 sBqzlnEuVlPIE0jc5LXinK7h4JEolvdmeHHWAKvVQMfoUBxKBQyKa0muErAi+DoH Oimuf27Ga+xSuoDyb34+Nhh2GySchEflyYMwp9VVy+vkApIGkRYJymba458oyQP3 LhkWSSUdP9d1I+AlJHq1zeukmryrGi39rumBvCQ2XPhn0y/Vt48TXAgoVA/M7q3S LY+oEvwnLrNWZkRQEr80lDDpaemmVAmPigj+viTBwhSR3z/cDmFWD1o7uga4Igv7 cMNxBkU0KfPByRz+c3TUnicJ4ZKBwQ== =8ZW9 -----END PGP SIGNATURE-----help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8011E549-1DEE-4B1B-BCC9-4604E155F4DC>
