From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id b1f60ce5 for ; Thu, 6 Feb 2020 22:08:48 +0000 (UTC) Received: (qmail 1378 invoked by uid 550); 6 Feb 2020 22:08:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1357 invoked from network); 6 Feb 2020 22:08:46 -0000 Date: Thu, 6 Feb 2020 23:08:34 +0100 From: Szabolcs Nagy To: musl@lists.openwall.com Message-ID: <20200206220834.GD23985@port70.net> Mail-Followup-To: musl@lists.openwall.com References: <20200114185058.GV23985@port70.net> <20200114185835.GG30412@brightrain.aerifal.cx> <20200206145156.GF1663@brightrain.aerifal.cx> <20200206174608.GG1663@brightrain.aerifal.cx> <20200206190344.GH1663@brightrain.aerifal.cx> <20200206200258.GI1663@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200206200258.GI1663@brightrain.aerifal.cx> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [musl] Q: dealing with missing removal of excess precision * Rich Felker [2020-02-06 15:02:58 -0500]: > #include > > int main() > { > double x, a=0; > for (x=-2; x<2; x+=0x1p-24) > a += exp(x); > return (long long)a; > } same here on my old core i5 x86_64 laptop asm: 3.13s c : 2.67s optimized-routines benchmark is asm: exp rthruput: 44.18 ns/elem 44176510 ns in [-9.9 9.9] exp latency: 48.32 ns/call 48317455 ns in [-9.9 9.9] expf rthruput: 28.59 ns/elem 28586714 ns in [-9.9 9.9] expf latency: 44.54 ns/call 44536368 ns in [-9.9 9.9] exp2 rthruput: 42.63 ns/elem 42634692 ns in [-9.9 9.9] exp2 latency: 46.54 ns/call 46543915 ns in [-9.9 9.9] exp2f rthruput: 27.75 ns/elem 27751888 ns in [-9.9 9.9] exp2f latency: 42.91 ns/call 42908855 ns in [-9.9 9.9] c: exp rthruput: 34.74 ns/elem 34735750 ns in [-9.9 9.9] exp latency: 38.88 ns/call 38879834 ns in [-9.9 9.9] expf rthruput: 14.88 ns/elem 14878824 ns in [-9.9 9.9] expf latency: 26.74 ns/call 26740464 ns in [-9.9 9.9] exp2 rthruput: 31.62 ns/elem 31622777 ns in [-9.9 9.9] exp2 latency: 35.76 ns/call 35760590 ns in [-9.9 9.9] exp2f rthruput: 14.87 ns/elem 14869128 ns in [-9.9 9.9] exp2f latency: 24.80 ns/call 24795727 ns in [-9.9 9.9]