From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13482 Path: news.gmane.org!.POSTED!not-for-mail From: Jon Chesterfield Newsgroups: gmane.linux.lib.musl.general Subject: Re: 32-bit double and long double Date: Mon, 26 Nov 2018 17:36:58 +0000 Message-ID: References: <87va4j3lpr.fsf@southeast> <20181126170339.GO23599@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000026db46057b94c864" X-Trace: blaine.gmane.org 1543253715 18168 195.159.176.226 (26 Nov 2018 17:35:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2018 17:35:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13498-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 26 18:35: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 1gRKmt-0004ae-2P for gllmg-musl@m.gmane.org; Mon, 26 Nov 2018 18:35:11 +0100 Original-Received: (qmail 9573 invoked by uid 550); 26 Nov 2018 17:37:19 -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 9552 invoked from network); 26 Nov 2018 17:37:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=sIAz/ocEhXLREi8EyTHC4YPofqEukXSxAMZnRrxo4ls=; b=N2cwwO/rAg8au57V4BlWK/2LtvYdZMZODSMQm3VI0BHKnKp8xgXWi4unUgOPGlTjD3 iaapzqz8SNBxC3dSqwrSDeYJy+E2PhWMjHv/A5iJydNqFk69dQhdfd/OnEyThxhc0XkD ZET+7dDlb/knUZWJs4B+DtVH1vmMYwT1SZfct9/SUtcUKd4OXhgrb0PXEzrGP+jooCqx aeefHpgh4gCzAm3OZZjT18+TaJhp/7OpTYyO2kHURxMYgTYAq5P6LmFSn5Wv6YDvuV7V xa6S8pNSvsJ7rvn8MjOu96MQUpnmUwqu/xkSYxk/r7srZSa610BwoD+AUXNOiDkbXXj9 3/Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=sIAz/ocEhXLREi8EyTHC4YPofqEukXSxAMZnRrxo4ls=; b=DTf4ZLQHjVy7iCl6Is81oYmySSc8Bjsp05rB39Mq9pK6bSBnU9TQGMnyf3C9b/HeZ4 rAqICLnRkunwqCxC8ZmQhzgsks3HzMeVRX0cJAadhGkjuugDv9mlQQDfzPdBsuvBBL4W N6e538WNOU5yA+kYQ2IoqWKBhFrrpupetqWVywzpn9zpkn6cMhygEsr0K9IgHBPrZ/Er FoBNeHKD0pnfc+QYXJembOFB2afoslw1XB1WWB1sL1OMHlEaoS3/VOYFQj/8o8uVzt0s hEtUI2ccAHG8TOc8Uow4hLq2vLGUbb9SG+CBPhsCXpAXiHIZXTUhxEmbhXGXiWsArkT1 eyjw== X-Gm-Message-State: AA+aEWbqrLk9tKRK6hF5+Yaj6JC0ebuoYzcwpNnAyxsl3kMDFIlV0Mzd sgDVRhyRin8xrOh9goN3RctK23KaRb4yvXEyn7M9jQ== X-Google-Smtp-Source: AFSGD/VioFCjoObwsof1cmHyctJf9Okr5Er4+/qmMx5FWuFcpkOdg4e+uThkdDJ2AhnjSYbzTs0fKqEFH81uvb6RzCU= X-Received: by 2002:a37:8d01:: with SMTP id p1mr26680070qkd.91.1543253826918; Mon, 26 Nov 2018 09:37:06 -0800 (PST) In-Reply-To: <20181126170339.GO23599@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:13482 Archived-At: --00000000000026db46057b94c864 Content-Type: text/plain; charset="UTF-8" > > Is there a reason your target is defining double in an unuseful and > incompatible way rather than doing hard-single and soft-double? If you > have any control over the choice of ABI, I think the latter makes a > lot more sense. > I can see a few arguments for float==double, but haven't actually done that for our target yet. A common error is to write 1.0 instead of 1.0f, where the former sometimes pulls in the soft double support. Integer arguments to libm functions promote to double but I would prefer promote to 32 bit float. Arguments to variadic functions promote to double. Again I would prefer 32 bit float. Leaving long double as 64 bit, unlike in the question, means no loss of functionality relative to double == long double. Cheers Jon > --00000000000026db46057b94c864 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Is there a reason your target is defining double in an unusef= ul and
incompatible way rather than doing hard-single and soft-double? If you
have any control over the choice of ABI, I think the latter makes a
lot more sense.

I can see a few arguments for float=3D=3Ddouble, but haven't = actually done that for our target yet.

A common error is to write 1.0 instead of 1.0f, where the fo= rmer sometimes pulls in the soft double support.
Integer arguments to libm functions promote to dou= ble but I would prefer promote to 32 bit float.

=
Arguments to variadic functions promote to double. = Again I would prefer 32 bit float.

Leaving long double as 64 bit, unlike in the question, means no = loss of functionality relative to double =3D=3D long double.

Cheers

Jon
--00000000000026db46057b94c864--