From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13685 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Possible Mistype in exp.c Date: Tue, 29 Jan 2019 12:43:08 +0100 Message-ID: <20190129114308.GD21289@port70.net> References: <20190129110135.GC21289@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="89661"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Damian McGuckin To: musl@lists.openwall.com Original-X-From: musl-return-13701-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 29 12:43:24 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1goRnW-000N95-HI for gllmg-musl@m.gmane.org; Tue, 29 Jan 2019 12:43:22 +0100 Original-Received: (qmail 27948 invoked by uid 550); 29 Jan 2019 11:43:20 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 27927 invoked from network); 29 Jan 2019 11:43:19 -0000 Mail-Followup-To: musl@lists.openwall.com, Damian McGuckin Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:13685 Archived-At: * Damian McGuckin [2019-01-29 22:26:23 +1100]: > On Tue, 29 Jan 2019, Szabolcs Nagy wrote: > > > it's not the division that's supposed to raise the exception, > > but the cast (although the division might in case of an x with > > sufficiently large magnitude). > > I did not think about that. An interesting approach. > > > in any case i plan to completely rewrite exp and other > > important math functions: > > > > https://www.openwall.com/lists/musl/2018/12/08/1 > > Thanks for the pointer. > > > that implementation is >2x faster in general than the old fdlibm code as > > well as more precise. > > It is hard to argue to 2x faster. Mind you, I certainly found the ARM code > much harder to read. Interesting none the less. i did some cleanups compared to the arm repository: https://www.openwall.com/lists/musl/2018/12/08/3/7 so e.g. some of the ifdef config variants got removed, if you have some particular idea what could be improved then let us know. (the special case handling is more complicated because it tries to avoid double rounding in the subnormal range, the old code had >0.75 ulp error in this case, the new code is always < 0.6 ulp error, it is probably not worth the trouble, but i tried to guarantee "almost always correctly rounded and only near half-way results may get incorrectly rounded" for the new implementations)