llvm::APFloatBase::Semantics

@{ Identifiers for the built-in floating-point formats APFloat supports.

Synopsis

Declared in <llvm/ADT/APFloat.h>

enum Semantics;

Members

NameDescription
S_IEEEhalf IEEE 754 binary16 (half precision).
S_BFloat Google brain floating-point format (bfloat16).
S_IEEEsingle IEEE 754 binary32 (single precision).
S_IEEEdouble IEEE 754 binary64 (double precision).
S_IEEEquad IEEE 754 binary128 (quad precision).
S_PPCDoubleDouble The IBM double-double semantics. Such a number consists of a pair of IEEE 64-bit doubles (Hi, Lo), where |Hi| > |Lo|, and if normal, (double)(Hi + Lo) == Hi. The numeric value it's modeling is Hi + Lo. Therefore it has two 53-bit mantissa parts that aren't necessarily adjacent to each other, and two 11-bit exponents.
S_PPCDoubleDoubleLegacy These are legacy semantics for the fallback, inaccurate implementation of IBM double-double, if the accurate semPPCDoubleDouble doesn't handle the operation. It's equivalent to having an IEEE number with consecutive 106 bits of mantissa and 11 bits of exponent.
S_Float8E5M2 8-bit floating point number following IEEE-754 conventions with bit layout S1E5M2 as described in https://arxiv.org/abs/2209.05433.
S_Float8E5M2FNUZ 8-bit float with S1E5M2 layout, finite-only and unsigned-zero semantics.
S_Float8E4M3 8-bit floating point number following IEEE-754 conventions with bit layout S1E4M3.
S_Float8E4M3FN 8-bit floating point number mostly following IEEE-754 conventions with bit layout S1E4M3 as described in https://arxiv.org/abs/2209.05433. Unlike IEEE-754 types, there are no infinity values, and NaN is represented with the exponent and mantissa bits set to all 1s.
S_Float8E4M3FNUZ 8-bit floating point number mostly following IEEE-754 conventions and bit layout S1E4M3 described in https://arxiv.org/abs/2206.02915, with expanded range and with no infinity or signed zero. NaN is represented as negative zero. (FN -> Finite, UZ -> unsigned zero). This format's exponent bias is 8, instead of the 7 (2 ** (4 - 1) - 1) that IEEE precedent would imply.
S_Float8E4M3B11FNUZ 8-bit floating point number mostly following IEEE-754 conventions and bit layout S1E4M3 with expanded range and with no infinity or signed zero. NaN is represented as negative zero. (FN -> Finite, UZ -> unsigned zero). This format's exponent bias is 11, instead of the 7 (2 ** (4 - 1) - 1) that IEEE precedent would imply.
S_Float8E3M4 8-bit floating point number following IEEE-754 conventions with bit layout S1E3M4.
S_FloatTF32 Floating point number that occupies 32 bits or less of storage, providing improved range compared to half (16-bit) formats, at (potentially) greater throughput than single precision (32-bit) formats.
S_Float8E8M0FNU 8-bit floating point number with (all the) 8 bits for the exponent like in FP32. There are no zeroes, no infinities, and no denormal values. This format has unsigned representation only. (U -> Unsigned only). NaN is represented with all bits set to 1. Bias is 127. This format represents the scale data type in the MX specification from: https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
S_Float6E3M2FN 6-bit floating point number with bit layout S1E3M2. Unlike IEEE-754 types, there are no infinity or NaN values. The format is detailed in https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
S_Float6E2M3FN 6-bit floating point number with bit layout S1E2M3. Unlike IEEE-754 types, there are no infinity or NaN values. The format is detailed in https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
S_Float4E2M1FN 4-bit floating point number with bit layout S1E2M1. Unlike IEEE-754 types, there are no infinity or NaN values. The format is detailed in https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
S_Float8E5M3FNU 8-bit floating point number mostly following IEEE-754 conventions with bit layout S0E5M3 as described in PTX ISA page. https://docs.nvidia.com/cuda/developer-preview/13.4/parallel-thread-execution/index.html#alternate-floating-point-data-formats Unlike IEEE-754 types, there are no infinity values, and NaN is represented with the exponent and mantissa bits set to all 1s.
S_x87DoubleExtended x87 80-bit double-extended precision format.
S_MaxSemantics Sentinel equal to the highest valid Semantics enumerator.