From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12186 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: remquo - underlying logic Date: Thu, 30 Nov 2017 22:17:13 +0100 Message-ID: <20171130211713.GT15263@port70.net> References: <20171130185956.GS15263@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1512076651 10487 195.159.176.226 (30 Nov 2017 21:17:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 30 Nov 2017 21:17:31 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-12202-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 30 22:17:27 2017 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.84_2) (envelope-from ) id 1eKWCu-000263-23 for gllmg-musl@m.gmane.org; Thu, 30 Nov 2017 22:17:20 +0100 Original-Received: (qmail 31880 invoked by uid 550); 30 Nov 2017 21:17:25 -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 31862 invoked from network); 30 Nov 2017 21:17:25 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12186 Archived-At: * Damian McGuckin [2017-12-01 07:29:05 +1100]: > It is on MY own TO-DO list. I was asking the question in case anybody had > done it before and found it useless, could think of major pitfalls, or had > any pearls of wisdom before we started. I will keep you posted. well, one of the difficulties is to get correct behaviour in case of fenv access (e.g. remquo has exact result in all rounding modes so intermediate results should be exact too, raising underflow correctly is sometimes nontrivial, getting the sign right when the result is zero in downward rounding mode sometimes needs special handling, etc), if you need to save/restore the fenv to achieve that then it's unlikely to be faster than using ints, otherwise floats are probably faster, but it's hard to tell.