half
2.2
IEEE 754-based half-precision floating-point library
|
Library-defined half-precision literals. More...
Functions | |
half | operator""_h (long double value) |
Half literal. More... | |
Library-defined half-precision literals.
Import this namespace to enable half-precision floating-point literals:
|
inline |
Half literal.
While this returns a properly rounded half-precision value, half literals can unfortunately not be constant expressions due to rather involved conversions. So don't expect this to be a literal literal without involving conversion operations at runtime. It is a convenience feature, not a performance optimization.
value | literal value |
FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |