From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id ABF513857C70 for ; Fri, 12 Mar 2021 20:54:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ABF513857C70 Received: by mail-wr1-x42a.google.com with SMTP id j2so5514584wrx.9 for ; Fri, 12 Mar 2021 12:54:07 -0800 (PST) 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:cc; bh=6yr5/uzsaZgTdkLZPZfOARF7YEfCq1bmGyMaGoMtgw8=; b=dDmsZjJi30SBUpcra2yK8ANIlWDGxhpcHzm+hKubaFoEtHxtOd5x0YM4IiTjH1fzxg KNzJAZAtElu2ViItW4x+BkWnoNSsf3aCeW7Vfx6Vbb4XPchypAnMGRRwFMRMZgCEFfxn 7OhfTblLB8a5es19zjuNms0fcDYDiiNkR8bUiEwcuWc4EWr300fQ+RTrUdsqFG1gR1In YT33flEQhVGL0br3YVKwZ7IGrJm+xOP0SjIcvXZW6nqKwVmMHrNin3Lakv6rQezGLEx1 PhF2obIN//vaLZZgZcJZ4WGadAR7MKu+S5Axg69o366kkOMz2p7R/NMsEFjUTnKtg+ZX iWTQ== X-Gm-Message-State: AOAM530v7ungxCKX9OkfqYeNtjyRWKLV9oWK0jJzYbK0if/AVP72p0+R selPBkuvLkKdBKDU89M2V0oz8aQT7Zf1oExa93Y= X-Google-Smtp-Source: ABdhPJw5Jfa6Jv2t3tt3gJIK5IrCnNoWpI4BQlK18agXBEFw4o02f4NNcYgyRl9NLQlF77kBVg/77gI4PUOQN9vcBCQ= X-Received: by 2002:a5d:4445:: with SMTP id x5mr16172531wrr.30.1615582446822; Fri, 12 Mar 2021 12:54:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Fri, 12 Mar 2021 20:53:51 +0000 Message-ID: Subject: Re: IEEE Interchange floating point and extended floating point for C++ To: Joseph Myers Cc: Sjoerd Meijer , Kito Cheng , GCC X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 20:54:09 -0000 On Fri, 12 Mar 2021, 18:14 Joseph Myers, 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 > 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.