C++ Logo

std-proposals

Advanced search

Re: [std-proposals] TBAA and extended floating-point types

From: Paul Caprioli <paul_at_[hidden]>
Date: Mon, 25 Aug 2025 18:25:50 +0000
IEEE 754-2019 defines floating-point formats. All formats can be supported as arithmetic formats; that is, they may be used to represent floating-point operands or results. Specific fixed-width encodings for binary and decimal formats are defined for a subset of the formats. These interchange formats are identified by their size and can be used for the exchange of floating-point data between implementations. I assume std::float16_t is a C++ arithmetic format. Note that it is unrelated to Unicode. See: https://en.wikipedia.org/wiki/UTF-16 The C++ standard section [basic.extended.fp] does not make clear (to me at least) the intended purpose of std::float32_t and std::float64_t. In particular, interoperability with arrays of float and double seems awkward at best. I'm requesting feedback as to whether reinterpret_cast should be made to work between floating-point types having identical representations. Should I bother to author such a proposal or would I be wasting my time? Also, insight into the intended purpose of std::float32_t and std::float64_t would be welcome.

Received on 2025-08-25 18:25:53