================
@@ -136,6 +136,7 @@ static constexpr fltSemantics semIEEEquad = {16383, -16382, 
113, 128};
 static constexpr fltSemantics semFloat8E5M2 = {15, -14, 3, 8};
 static constexpr fltSemantics semFloat8E5M2FNUZ = {
     15, -15, 3, 8, fltNonfiniteBehavior::NanOnly, 
fltNanEncoding::NegativeZero};
+static constexpr fltSemantics semFloat8E4M3 = {7, -6, 4, 8};
----------------
apivovarov wrote:

`f8E4M3` type follows IEEE 754 convention:
- Exponent bias: 7
- Maximum stored exponent value: 14 (binary 1110)
- Maximum unbiased exponent value: 14 - 7 = 7
- Minimum stored exponent value: 1 (binary 0001)
- Minimum unbiased exponent value: 1 − 7 = −6
- Precision specifies the total number of bits used for the significand 
(mantisa), including implicit leading integer bit = 3 + 1 = 4

`fltSemantics semFloat8E4M3 = {7, -6, 4, 8};`:
- maxExponent = 7
- minExponent = -6
- precision = 4
- sizeInBits = 8
- nonFiniteBehavior = fltNonfiniteBehavior::IEEE754
- nanEncoding = fltNanEncoding::IEEE

https://github.com/llvm/llvm-project/pull/97179
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to