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 57AA73945C1D for ; Mon, 7 Sep 2020 22:52:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 57AA73945C1D Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 52A763F2D6BC; Mon, 7 Sep 2020 15:52:56 -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 p7FT5G-Afxix; Mon, 7 Sep 2020 15:52:53 -0700 (PDT) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id 8D49D3F2D5CF; Mon, 7 Sep 2020 15:52:53 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id 698B41582199; Mon, 7 Sep 2020 15:52:53 -0700 (PDT) From: "Keith Packard" To: Joseph Myers Cc: Kito Cheng , Newlib Subject: Re: [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt In-Reply-To: References: <20200903205433.2108717-1-keithp@keithp.com> <87blim87ps.fsf@keithp.com> Date: Mon, 07 Sep 2020 15:52:53 -0700 Message-ID: <87eend42t6.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: Mon, 07 Sep 2020 22:52:58 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Joseph Myers writes: > However, it's probably nontrivial to get the tests running on other > implementations, since they freely make use of glibc-specific > features, and the particular glibc choices they test for regarding > errno, exceptions and expected accuracy of results may not match the > choices made by other libm implementations. I agree -- I looked at getting the glibc tests running on newlib and decided that it would be more effort that I could afford. For now, I've got the original newlib test suite running after spending several months fixing it. In particular, for the math tests, I ran glibc against the test vectors and replaced the expected results with those as the existing values had become corrupted over the years (not just inaccurate, but wildly wrong). Mismatches between newlib and glibc were investigated, and patches to newlib have been integrated. No patches were needed for glibc. Now newlib generates results that match glibc within reasonable tolerance bounds. With the recent patches to fix up exceptions and errno values, newlib and glibc match there as well. I guess this is kinda like testing newlib against the glibc test suite at a distance -- glibc gets tested, then we make sure newlib and glibc generate the same values for a different set of tests... I'd love to be able to spend time improving the accuracy of newlib code, but just having code which constantly measures 'reasonably close' to glibc is a huge improvement from my perspective. =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9WucUACgkQ2yIaaQAA ABEoEw//VL6cY5LyiGtX7WlS252X4eQcAYt10DhaN5MHsRcIw/APWaoAccqvgIwq xyQzIgdxpvJcDhWt7C9gVnmTm7CmUQrh7TdKlqUw1QeK+p84DmvgmA3DiNRgiR3p 69RO+5GE5aUF9w3Cex+1qMijWJ/Wi0zEVQBrxMOMi1XWjcrzc/XTHzXoBtDc0bzU A9thyCa9+IMWdiGm7SgfnT1XqcdOMIID5CUxGtSaOMTNyzTkzMkw6V1NNTrJ2cEJ kV1lIII05iU1y+2CAiAEr+5WfflDrRu9DJK8jiXEGvb1CqLlyE/3M1Tv2SmjjHmm zx61PvWbi4fYEgMCy1SqG9+J8Av2xnMAQiaody7mKzAnF9nDjjid4aGNI8Gr5nFY jJeX5fcL17rb+yGjl+0Hut34AtYqWqGwJ3juFHE9xehSG+IPtAQsZura3Gk98ade wMULdt5s7DEwfuiv1dYTwIWGW6wwwIoz8EKTfLkrGrBXdYi/QnETyeFichc2annq 3djkZFSoy5/XAmQXoXORIZVweQIIzVpuO4J8vYdBJzRQ15rwXQR6zvEo6Mb/k0v8 eWIJaDsrAfKL//hBnSpHtxptfRUycSTfBk2mOayBeIdc01OUO3eEU1lal22sjsFa WWrDhYWwJm+vfzMlOo5F70Us4Q8pJneGIrgXvFgN4hgNxTjtQA8= =r404 -----END PGP SIGNATURE----- --=-=-=--