From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13485 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: 32-bit double and long double Date: Tue, 27 Nov 2018 13:52:01 +0100 Message-ID: <20181127125201.GS21289@port70.net> References: <87va4j3lpr.fsf@southeast> <20181126170339.GO23599@brightrain.aerifal.cx> <20181127023211.GR23599@brightrain.aerifal.cx> 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 1543323015 2603 195.159.176.226 (27 Nov 2018 12:50:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 12:50:15 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-13501-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 27 13:50:11 2018 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 1gRcoc-0000P9-Uv for gllmg-musl@m.gmane.org; Tue, 27 Nov 2018 13:50:11 +0100 Original-Received: (qmail 7178 invoked by uid 550); 27 Nov 2018 12:52:14 -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 6127 invoked from network); 27 Nov 2018 12:52:13 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20181127023211.GR23599@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:13485 Archived-At: * Rich Felker [2018-11-26 21:32:11 -0500]: > On Mon, Nov 26, 2018 at 05:36:58PM +0000, Jon Chesterfield wrote: > > Arguments to variadic functions promote to double. Again I would prefer 32 > > bit float. > > Indeed this is a hard limitation of the language. I suppose it comes > in mostly/only for passing floating point values to printf. The > promotion should at least be nothing more than a few 64-bit shift/or > ops. well floating-point is usually tricky.. conversion to double should signal an invalid exception for snan. subnormal range values need different logic than normal range ones and likely require a clz operation. if you support flush-to-zero arithmetics then subnormal input should raise an input-denormal exception and treat it as zero. ..but all this is implemented in libgcc soft-fp support.