From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 94EA03858400 for ; Mon, 25 Oct 2021 17:05:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 94EA03858400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: vwqMr5QBnFc7qEJWNONwnTzIXTF/IvlH6uBRmkZtMnKaAASEwrXwz0LtiSIqrLAeaBp96q/6nU eKjbIPAMZggY6KKym7K3gn6s1KBIBWv5yk9G0I3wf72K/0Z9ZAgZmQhZOGQSgG7GEs5c+ftEqh YzP/5hND1ospgWPgXeiDYt+HVXNW9P7TR0G0g4g4oB0OIGdb4xa7fYt27jfr9Mk2PS+3lBBM6l kToibQWb9/xUiwYckqityCH5IzoKAXw6Ou0nzgkgCHSWmpAdnbguTR2+Hp/wLkCKYyRx6LMxFO DdQeFu81oIHYjvYicpAIH5nE X-IronPort-AV: E=Sophos;i="5.87,181,1631606400"; d="scan'208";a="67598676" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 25 Oct 2021 09:05:22 -0800 IronPort-SDR: uBthpotdujQ186b2/Vja5QkVxSzmA2jzE/K2Cr7EeW7qzatrtM+evR9llMsW0rxqj41rn1l8z1 qSQIUp6DWLvbOBfqpJqZSQJhXVckWeWPf0VkeIM2B0FwYEx/ZCnpPutPd5xJzSTv78VIoPGYU9 1Hht4aV6qEf5EmGJt4EVko9GVrGzElekVqGAtR6XGQSsDMQ0k8+gszRB6G/sBCtwYhYEe+zq05 BIaLzt6Z7A+pRTBvIlUj9hbnF41tEpft/zj9zBds3cHZTYJn1buW5P0pNerf/fuUKmZ7KRunki 7PU= Date: Mon, 25 Oct 2021 17:05:16 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Adhemerval Zanella CC: Sunil K Pandey , Subject: Re: [PATCH] Add missing math functions to benchtests In-Reply-To: <3dc02603-3318-e0d3-8c67-8610e923e751@linaro.org> Message-ID: References: <20211022190416.1736398-1-skpgkp2@gmail.com> <3dc02603-3318-e0d3-8c67-8610e923e751@linaro.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3117.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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2021 17:05:25 -0000 On Fri, 22 Oct 2021, Adhemerval Zanella via Libc-alpha wrote: > On 22/10/2021 16:04, Sunil K Pandey via Libc-alpha wrote: > > Add acosf, acoshf, asinf, asinhf, atan2f, atanf, atanhf, cbrtf, coshf, > > erfcf, erff, expm1f, hypotf, log10f, log1pf, sinhf, tanf and tanhf > > functions to math benchtests. > > Please split one patch per function and add a rationale on how each input > were generate. Keep in mind that using pure random values might not be > meaningful (as Joseph has noted for my recent hypot/hypotf one [1]. Indeed. Apart from the fact that most of the inputs in many of these files are outside the range of float and so completely useless, and the rest have spurious precision rather than being rounded to the precision of float: * Most atan2 benchmark inputs should have two arguments of similar magnitude, otherwise you're just testing the cases where the result is very close to 0, +/- pi/2, +/- pi, rather than those where there is anything interesting to compute. It looks like we need to replace the existing atan2-inputs as well as not replicating the problem for atan2f. * A large proportion of expm1 inputs should be cases where the difference between expm1 and exp - 1 actually matters (i.e. arguments not too far from 0 in either direction) - again, the existing inputs should be replaced. * Similarly for log1p, a large proportion of arguments should be close to 0 where the function is meaningfully different from log(x + 1). * For tan, a large proportion of inputs should be within a range of +/- a few multiples of pi from 0, the existing tan-inputs and new tanf-inputs seem to have far too many inputs involving the range reduction for very large inputs, which doesn't seem very realistic. -- Joseph S. Myers joseph@codesourcery.com