From nobody Mon Dec 20 10:15:53 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 108F918F0990; Mon, 20 Dec 2021 10:16:04 +0000 (UTC) (envelope-from marc@blackend.org) Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [IPv6:2a01:e0c:1:1599::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JHb8L4rw7z3tqH; Mon, 20 Dec 2021 10:16:02 +0000 (UTC) (envelope-from marc@blackend.org) Received: from emphyrio.blackend.org (unknown [82.64.86.146]) by smtp1-g21.free.fr (Postfix) with ESMTPS id 33472B0057F; Mon, 20 Dec 2021 11:15:54 +0100 (CET) Received: from emphyrio.blackend.org (localhost [127.0.0.1]) by emphyrio.blackend.org (8.16.1/8.16.1) with ESMTPS id 1BKAFsBY001311 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 20 Dec 2021 11:15:54 +0100 (CET) (envelope-from marc@emphyrio.blackend.org) Received: (from marc@localhost) by emphyrio.blackend.org (8.16.1/8.16.1/Submit) id 1BKAFr4l001310; Mon, 20 Dec 2021 11:15:53 +0100 (CET) (envelope-from marc) Date: Mon, 20 Dec 2021 11:15:53 +0100 From: Marc Fonvieille To: Mark Murray Cc: Steve Kargl , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: What to do about tgammal? Message-ID: Mail-Followup-To: Mark Murray , Steve Kargl , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <20211204185352.GA20452@troutmask.apl.washington.edu> <20211213022223.GA41440@troutmask.apl.washington.edu> <813F29E3-8478-4282-9518-5943DE7B5492@FreeBSD.org> <20211214215106.GA50381@troutmask.apl.washington.edu> <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> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xCByWbMwccz7wm2s" Content-Disposition: inline In-Reply-To: <8011E549-1DEE-4B1B-BCC9-4604E155F4DC@FreeBSD.org> X-Rspamd-Queue-Id: 4JHb8L4rw7z3tqH X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of marc@blackend.org has no SPF policy when checking 2a01:e0c:1:1599::10) smtp.mailfrom=marc@blackend.org X-Spamd-Result: default: False [-2.90 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[marc]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[blackend@freebsd.org,marc@blackend.org]; R_SPF_NA(0.00)[no SPF record]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:12322, ipnet:2a01:e00::/26, country:FR]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[blackend@freebsd.org,marc@blackend.org]; RECEIVED_SPAMHAUS_PBL(0.00)[82.64.86.146:received] X-ThisMailContainsUnwantedMimeParts: N --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 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 > >=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--