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 e255a4a3 for ; Thu, 6 Feb 2020 19:03:59 +0000 (UTC) Received: (qmail 14256 invoked by uid 550); 6 Feb 2020 19:03:58 -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 14238 invoked from network); 6 Feb 2020 19:03:57 -0000 Date: Thu, 6 Feb 2020 14:03:44 -0500 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200206190344.GH1663@brightrain.aerifal.cx> References: <20200114185058.GV23985@port70.net> <20200114185835.GG30412@brightrain.aerifal.cx> <20200206145156.GF1663@brightrain.aerifal.cx> <20200206174608.GG1663@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200206174608.GG1663@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: Rich Felker Subject: Re: [musl] Q: dealing with missing removal of excess precision On Thu, Feb 06, 2020 at 12:46:08PM -0500, Rich Felker wrote: > On Thu, Feb 06, 2020 at 08:15:30PM +0300, Alexander Monakov wrote: > > On Thu, 6 Feb 2020, Rich Felker wrote: > > > > > I think I might like to go ahead and apply these patches now, or at > > > least some of them -- the ones fixing excess precision -- rather > > > waiting, because I got a report of a nasty bug stemming from excess > > > precision of the inverse trig functions: > > > > That might be exactly the empty set of patches, as I did not yet post > > any for functions that might return with excess precision. > > Indeed, I just discovered that... > > > Be advised that I found bugs in my patches, so given that no one so far > > has pointed them out on the mailing list indicates that either nobody > > bothered to review, or people are keeping the findings to themselves. > > I think it's just that I was planning to do further review after > release rather than before since I'm trying to get the release out.. > > > > If writing and testing the remaining i386 functions before release is > > > not practical, I wonder if just removing the asm for now, and adding > > > back the new code in next release cycle would be a good idea. Or I > > > could just leave it, but I don't like making a release with "known > > > bugs of consequence" like this. > > > > I think fixing excess precision in inverse trig functions might be > > easier than removing the asm entirely. > > Yes, what I'm looking at right now is fixing inverse trig and log > functions and removing the exp asm (since the exp logic is way too > messy for me to feel comfortable modifying right now) and possibly > re-adding it later as inline asm with the flow control in C. FWIW nsz's new C exp seems considerably faster than the existing 386 asm on my box (Atom S1260) (6.7s vs >8s for summing exp(x) from x=-2..2 stepping 0x1p-24). Test program attached in case anyone else wants to try it. So I think just removing exp*.s is the right approach for now. The long double ones should actually be left, and that raises the issue that expm1l is wrongly using the exp code rather than expl code nsz added long ago in a8f73bb1a685dd7d67669c6f6ceb255cfa967790. I won't try to fix this yet but will just move the files around so we can rm the float/double ones and use the C for them without getting rid of the ld asm. Rich