public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Sjoerd Meijer <Sjoerd.Meijer@arm.com>,
	Kito Cheng <kito.cheng@gmail.com>, GCC <gcc@gcc.gnu.org>
Subject: Re: IEEE Interchange floating point and extended floating point for C++
Date: Fri, 12 Mar 2021 20:53:51 +0000	[thread overview]
Message-ID: <CAH6eHdT52XY3yfh9aNpYkKduJw57VN-U_Z-JSp9abBYAmBQFSQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2103121812380.939551@digraph.polyomino.org.uk>

On Fri, 12 Mar 2021, 18:14 Joseph Myers, <joseph@codesourcery.com> wrote:

> On Fri, 12 Mar 2021, Joseph Myers wrote:
>
> > On Fri, 12 Mar 2021, Jonathan Wakely wrote:
> >
> > > On Fri, 12 Mar 2021 at 12:26, Sjoerd Meijer via Gcc <gcc@gcc.gnu.org>
> wrote:
> > > > So here's finally my concrete question: what do we think about
> making _Float16 available in C++ mode?
> > >
> > > I think GCC should do it.
> >
> > What about types with the same format as an existing type (but which are
> > nevertheless distinct types in C), such as _Float64 (typically same
> format
> > as double) or _Float32 (typically same format as float, but not promoted
> > when passed in variable arguments)?
>
> And also the _Float32x, _Float64x types (we don't have any targets
> supporting _Float128x).  (On all systems supporting those types in GCC,
> _Float32x has the same format as double and _Float64, and _Float64x has
> the same format as either long double or _Float128, but again they are
> different types.)
>

I see less value in adding additional distinct types that don't add
anything you can't already do. _Float16 gives you access to an entirely new
data type. _Float32 just complicates overloading of it's a new type with
the same representation as an existing one. With the proposed std::float32
typedef for C++ users will still be able to write code that definitely uses
an IEEE binary32 type without needing a new type to be introduced. ISTM
that what users really want is "a type guaranteed to be IEEE binary32" and
whether that is float or _Float32 is mostly irrelevant.

  reply	other threads:[~2021-03-12 20:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  9:07 Kito Cheng
2021-03-11 12:56 ` Jonathan Wakely
2021-03-11 14:02   ` Gabriel Ravier
2021-03-11 15:14     ` Jonathan Wakely
2021-03-11 15:14       ` Jonathan Wakely
2021-03-12  6:50         ` Kito Cheng
2021-03-11 14:26 ` Joseph Myers
2021-03-12  7:17   ` Kito Cheng
2021-03-12  9:27   ` Jonathan Wakely
2021-03-12 11:42 ` Sjoerd Meijer
2021-03-12 12:31   ` Jonathan Wakely
2021-03-12 17:49     ` Joseph Myers
2021-03-12 18:14       ` Joseph Myers
2021-03-12 20:53         ` Jonathan Wakely [this message]
2021-03-12 21:55           ` Joseph Myers
2021-03-12 22:03             ` Jonathan Wakely
2021-03-15 10:16               ` Sjoerd Meijer
2021-03-15 10:20                 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdT52XY3yfh9aNpYkKduJw57VN-U_Z-JSp9abBYAmBQFSQ@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=Sjoerd.Meijer@arm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=kito.cheng@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).