From nobody Sat Dec 18 17:59:42 2021 X-Original-To: freebsd-hackers@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 4A21B18EB982; Sat, 18 Dec 2021 17:59:46 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JGYXL0NZxz4jDd; Sat, 18 Dec 2021 17:59:46 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from smtpclient.apple (unknown [IPv6:2a02:8011:300b:42:6dfc:850d:c1cd:d820]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: markm) by smtp.freebsd.org (Postfix) with ESMTPSA id 628F823DCE; Sat, 18 Dec 2021 17:59:45 +0000 (UTC) (envelope-from markm@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_39AA88BD-0EEE-4E7D-9F37-3FC17D2DD0EA"; protocol="application/pgp-signature"; micalg=pgp-sha512 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: What to do about tgammal? From: Mark Murray In-Reply-To: <20211218175151.GA71197@troutmask.apl.washington.edu> Date: Sat, 18 Dec 2021 17:59:42 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8011E549-1DEE-4B1B-BCC9-4604E155F4DC@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> To: Steve Kargl X-Mailer: Apple Mail (2.3693.20.0.1.32) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639850386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8awRWXdBdNSaG0H+w7qzgxKu0/o7+nYCAv4yo0dDwpo=; b=ksG/miBvnt0mQJJhLKubSCG4v+AWL+29ZZNXjvF2fOvMoCX9UdMYimfV5/6+QItp1whzvp LFHHvOB7YEVLpUxeS5UydZihTRD6r7EzRdZ9kGgZpICMArHCNOe3/2L+qgbdyIy9CjvV8F i+h9TzNR2X7+uils8YHbcdL0PxlFX4wVa6VoOucCqXmtZ9uzE8zmqc6SuY24SgcVIh/5W4 ztVs1gXxrAQHxgNHr6IiWqiFoCOt7dzbZOaSDgN0RKKi9BFglK/tUjs4DeQv4gLC57Nl4C 61QBXzD8G/4wPNBHp2k3KfrdpXqhnxY36XgwT/ZR04qOJ4ZnkiSXcNza9L/EPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639850386; a=rsa-sha256; cv=none; b=lTHFPtsYdVc9073Talb0h0m5QMcmRXxllHxJWcUEZv7zv7TT/Zup3erbcCRdq+yXSBHAW1 6Hgk34FNFFwR6Ny9IGbpytEYRpvXUySSLoMQ75sFqipSbmUBX16mzdEec/sUqZBOfGmX39 XnnNFmsyAqpQz7nQ+08qKqcgF8wGRC8mb4S4bNvnJYF4Tqw+hHz89cy18l5aY/QQSA6ifZ iUTVe+LNwwQL/hedabTPbB3rcc+4Z+l2UHO/YWMInbO7RmDy8Qpa1zMM1yjSB5hSnm+oaH B1CuARUbZkUibxkepo7nrKqzc+VXa9Y2OC+3+6GqJtf/+WAVxLvMQ/h5iIp6Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_39AA88BD-0EEE-4E7D-9F37-3FC17D2DD0EA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > 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". > =46rom a very old das@ email and for long double I have 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 --Apple-Mail=_39AA88BD-0EEE-4E7D-9F37-3FC17D2DD0EA 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 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----- --Apple-Mail=_39AA88BD-0EEE-4E7D-9F37-3FC17D2DD0EA--