From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 520C439450F9 for ; Mon, 7 Sep 2020 17:41:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 520C439450F9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: 0+/+YAFtNrU6VvuY7LfQgpbqzizXf024hHsKMPs8+1oBOmjAHIx+cwg++2mntZNwAeEjh7Js4M 9DjfsMbvQvHKVuHUufLCIv1kAMfH6Pu/kjlSGHbHlUnI+A1lFUYKwXTi5PmcPurIfb2wIhAe5W 8cu8N1jyqdnWY7zClLpuqU+pQc6D4NIcy83OYLrIPJyFUYWsVgeRZrbPI+uhxZdSiI8kjSgf+W JPavWxweD+5iRQQCxXIxwhpVePwFGTGWDA02QDXXNIa6cUkUkTZaFFY6qzKksDraDpJ/MHF3q+ amQ= X-IronPort-AV: E=Sophos;i="5.76,402,1592899200"; d="scan'208";a="52639998" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 07 Sep 2020 09:41:06 -0800 IronPort-SDR: sdbsH3Lz9pPte0ua1UwNL+DwSptLp2f+6BogdSo4KF3gRSVXCAxEG13LOPQ6BcpurgzldZxPpI l2DHiLWISTSlvEoz12Fc6O9K91oYVOHa3FnXgAtwLfP67vdMzMAkLqT3eU4umSG7y2O1YQYU/7 CQbrtTPSF2W6WTog+NfDURYWRPF9UACsk6QHZD39xi1DdJlvwsOaE71Prs7+g9V0AUDG/HRAff 3J+h7VjMywn4w7gdEUsNb8Y6oIe8DlKqlkigNGKDni+qXLVGigi9JEfHyfC0BWb3xppFhto6Gl Id8= Date: Mon, 7 Sep 2020 17:41:00 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Keith Packard CC: Kito Cheng , Newlib Subject: Re: [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt In-Reply-To: <87blim87ps.fsf@keithp.com> Message-ID: References: <20200903205433.2108717-1-keithp@keithp.com> <87blim87ps.fsf@keithp.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3127.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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 17:41:08 -0000 On Thu, 3 Sep 2020, Keith Packard via Newlib wrote: > I've got a bunch of errno/exception tests that I've written for picolibc > that catch missing errno values, which is what the sqrt difference would > have caused. As for fma, you'd have to construct a test that checked for > the difference between a true fma and (a*b)+c that the general code in > newlib currently uses. glibc has a great many tests of expected libm function return values, errno and exceptions, both manually maintained (libm-test-*.inc) and with expected results generated by MPFR (auto-libm-test-in generating auto-libm-test-out-* via gen-auto-libm-tests.c). It would be interesting to see what those tests show up as bugs when run on different libm implementations (and vice versa, of course, running other libm implementations' tests on glibc). 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. -- Joseph S. Myers joseph@codesourcery.com