From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1543 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Priorities for next release? Date: Sun, 12 Aug 2012 14:40:22 +0200 Message-ID: <20120812124021.GE20243@port70.net> References: <20120810191254.GA13232@brightrain.aerifal.cx> <20120811195649.GK27715@brightrain.aerifal.cx> <20120811222522.GO27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344775243 4138 80.91.229.3 (12 Aug 2012 12:40:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Aug 2012 12:40:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1544-gllmg-musl=m.gmane.org@lists.openwall.com Sun Aug 12 14:40:44 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T0XTA-00057S-Vn for gllmg-musl@plane.gmane.org; Sun, 12 Aug 2012 14:40:37 +0200 Original-Received: (qmail 17471 invoked by uid 550); 12 Aug 2012 12:40:34 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17463 invoked from network); 12 Aug 2012 12:40:34 -0000 Content-Disposition: inline In-Reply-To: <20120811222522.GO27715@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1543 Archived-At: * Rich Felker [2012-08-11 18:25:22 -0400]: > Actually not quite as easy as I thought. Do we also want the float and > ld versions? And how are they supposed to behave on inf/nan? I think bsd only seem to have significand and significandf so no ld version actually the same is true for scalb (musl declares scalbl but only defines scalb and scalbf, so i guess scalbl can be reomved from math.h) > an optimal implementation would be something like: > > if (isnormal(x.d)) return x.rep = (x.rep&mask|exp_0), x.d; > else return scalbn(x, -ilogb(x)); > freebsd just returns scalbn(x, -ilogb(x)) we can do that as well (eventhough it's not very efficient for normal values) (the i386 asm version uses fxtract which does the same)