From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id 2C214398BC20 for ; Thu, 17 Sep 2020 16:11:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2C214398BC20 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 2CF073F2D8E6; Thu, 17 Sep 2020 09:11:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VSm5XAYMWi9v; Thu, 17 Sep 2020 09:11:52 -0700 (PDT) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id 6CE963F2D8AF; Thu, 17 Sep 2020 09:11:52 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id 1D53315821A6; Thu, 17 Sep 2020 09:11:52 -0700 (PDT) From: "Keith Packard" To: Paul Zimmermann Cc: newlib@sourceware.org Subject: Re: issue with tgammaf In-Reply-To: References: <87een3eyq4.fsf@keithp.com> <87sgbheouh.fsf@keithp.com> Date: Thu, 17 Sep 2020 09:11:51 -0700 Message-ID: <878sd8e62g.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 16:11:57 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Paul Zimmermann writes: >> You might have more luck with lgammaf_r as that avoids use of >> _impure_ptr in newlib. > > thank you very much Keith, that made it. The results for lgammaf_r are > the same as those with OpenLibm and Musl: That isn't surprising; so many libraries math support can be traced back to the original SunPro code. Thanks much for doing this analysis; it's nice to see careful measurements of how accurate each of these C libraries is. Have you published the test framework so we can replicate these results and monitor their change over time? Do you know that newlib has two different sets of 32-bit math functions? Arm supplied a new set of many common math functions that use 64-bit doubles for the intermediate computations? I'd be very interested in measuring the effect of that code on accuracy. The new paths are selected by compiling newlib with -D__OBSOLETE_MATH_DEFAULT=3D0 while the old can be selected with -D__OBSOLETE_MATH_DEFAULT=3D1 =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9jiscACgkQ2yIaaQAA ABGGDw//RneKzvPM2J0PcKOwDxFa/4LxrPxb805qWeEcwP1rTeRObpQh+wR5bOzC kpPaBiA24ujHwD2eZ1n7LB3CnrXFNK5ibHWORJry9Os/d4PlwlqLfJKh6daZyISb 5KlbEajledA9G39MaSQJVHCka+hqKvzaXu0is/di+pjtUlKJGmNo0ARafrRjUvTh 6tZhiBVuhoyqvzrGOaQWtep09Z72h10SvPP4xF2ua3NrgppcwRyA5mbN0aUvfWzb MTZR4fxKaBxobMtbxrAC1nJIyp0pIoPayc5Q69ShhbsO3wIdwcltZpYhjvtcPsZA 2DrunGR8NIt+np4LZfpFAhL9SUsBqZeT4+oyp6K29VcDgOt9PSxv9R47irM/Srf2 2ewuMnLaWGRRW+QWb97Zts27rZ6iZTGm7IgI5t0HHKIOEHa6A1rPTqLCUX8255l4 kEq+gsvG+rweWFuwE2+2XLwR8MPtJs5fz6MfnF13hHcWZXA6kqcr46kBW8KCLKUp KCLFn41CRvUJGj9x+8hctW1uYrgGdqmYBVSUlX3Id6U4n252hwNvYDCxyOmbGXfX q7BgAISPnwuvPF7HwCIcmLyZVcgdP1hPxUDZr/avcbI1duG8yhSxTdPJNCvmkxxl c9i0iSFpISTL4p++YccfJsNRNLORWA67M97+V4nK9QaEqKKEk9A= =QIpv -----END PGP SIGNATURE----- --=-=-=--