If the implementation supports any of the following ISO 60559 types as an extended floating-point type, then:
_Float16
16 11 5 15 float32_t f32 or F32 __STDCPP_FLOAT32_T__ _Float32
32 24 8 127 float64_t f64 or F64 __STDCPP_FLOAT64_T__ _Float64
64 53 11 1023 float128_t f128 or F128 __STDCPP_FLOAT128_T__ _Float128
128 113 15 16383 bfloat16_t bf16 or BF16 __STDCPP_BFLOAT16_T__ (N/A) 16 8 8 127 [edit] Notes
The type std::bfloat16_t
is known as Brain Floating-Point.
Unlike the fixed width integer types, which may be aliases to standard integer types, the fixed width floating-point types must be aliases to extended floating-point types (not float / double / long double), therefore not drop-in replacements for standard floating-point types.
[edit] Example#include <stdfloat> #if __STDCPP_FLOAT64_T__ != 1 #error "64-bit float type required" #endif int main() { std::float64_t f = 0.1f64; }[edit] References
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4