From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11869 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] math: rewrite fma with mostly int arithmetics Date: Tue, 29 Aug 2017 22:04:30 -0400 Message-ID: <20170830020430.GC19925@brightrain.aerifal.cx> References: <20170418224140.GN2082@port70.net> <20170422222425.GI17319@brightrain.aerifal.cx> <20170423110052.GQ2082@port70.net> <20170423151539.GO17319@brightrain.aerifal.cx> <20170423223448.GR2082@port70.net> <20170423223533.GS2082@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 1504058700 31362 195.159.176.226 (30 Aug 2017 02:05:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 Aug 2017 02:05:00 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11882-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 30 04:04:51 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 1dmsMw-0007G4-2C for gllmg-musl@m.gmane.org; Wed, 30 Aug 2017 04:04:38 +0200 Original-Received: (qmail 14151 invoked by uid 550); 30 Aug 2017 02:04:43 -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 14133 invoked from network); 30 Aug 2017 02:04:42 -0000 Content-Disposition: inline In-Reply-To: <20170423223533.GS2082@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11869 Archived-At: On Mon, Apr 24, 2017 at 12:35:33AM +0200, Szabolcs Nagy wrote: > /* one bit is lost when scaled, add another top bit to > only round once at conversion if it is inexact */ > if (rhi << 53) { > i = rhi>>1 | (rhi&1) | 1ull<<62; > if (sign) > i = -i; > r = i; > r = 2*r - c; /* remove top bit */ > volatile double uflow = DBL_MIN/FLT_MIN; > uflow *= uflow; > } Is there any way to get rid of the volatile hack here? Rich