Predefined Microfloats
Microfloats defines and exports a set of common types.
IEEE-like
These types have IEEE 754-like Inf/NaN encodings, with Inf being represented as all 1s in the exponent and a significand of zero, and NaN being represented as all 1s in the exponent and a non-zero significand.
Microfloats.Float8_E5M2 — Type
Float8_E5M2Properties
- Bits:
1sign +5exponent +2significand (8total) - Has Inf:
true - Has NaN:
true - Non-finite behavior:
Microfloats.IEEE - Overflow policy:
Microfloats.Overflowing() - Max normal:
57344.0 - Min normal:
6.103515625e-5 - Max subnormal:
4.57763671875e-5 - Min subnormal:
1.52587890625e-5
Microfloats.Float8_E4M3 — Type
Float8_E4M3Properties
- Bits:
1sign +4exponent +3significand (8total) - Has Inf:
true - Has NaN:
true - Non-finite behavior:
Microfloats.IEEE - Overflow policy:
Microfloats.Overflowing() - Max normal:
240.0 - Min normal:
0.015625 - Max subnormal:
0.013671875 - Min subnormal:
0.001953125
Microfloats.Float8_E3M4 — Type
Float8_E3M4Properties
- Bits:
1sign +3exponent +4significand (8total) - Has Inf:
true - Has NaN:
true - Non-finite behavior:
Microfloats.IEEE - Overflow policy:
Microfloats.Overflowing() - Max normal:
15.5 - Min normal:
0.25 - Max subnormal:
0.234375 - Min subnormal:
0.015625
Finite
These types have no Inf encoding, with alternate or no NaN encodings at all.
Microfloats.Float8_E4M3FN — Type
Float8_E4M3FNProperties
- Bits:
1sign +4exponent +3significand (8total) - Has Inf:
false - Has NaN:
true - Non-finite behavior:
Microfloats.NanOnlyAllOnes - Overflow policy:
Microfloats.Overflowing() - Max normal:
448.0 - Min normal:
0.015625 - Max subnormal:
0.013671875 - Min subnormal:
0.001953125
Microfloats.Float8_E8M0FNU — Type
Float8_E8M0FNUProperties
- Bits:
0sign +8exponent +0significand (8total) - Has Inf:
false - Has NaN:
true - Non-finite behavior:
Microfloats.NanOnlyAllOnes - Overflow policy:
Microfloats.Overflowing() - Max normal:
1.7014118346046923e38 - Min normal:
5.877471754111438e-39 - Max subnormal:
N/A - Min subnormal:
N/A
Microfloats.Float6_E3M2FN — Type
Float6_E3M2FNProperties
- Bits:
1sign +3exponent +2significand (6total) - Has Inf:
false - Has NaN:
false - Non-finite behavior:
Microfloats.FiniteOnly - Overflow policy:
Microfloats.Saturating() - Max normal:
28.0 - Min normal:
0.25 - Max subnormal:
0.1875 - Min subnormal:
0.0625
Microfloats.Float6_E2M3FN — Type
Float6_E2M3FNProperties
- Bits:
1sign +2exponent +3significand (6total) - Has Inf:
false - Has NaN:
false - Non-finite behavior:
Microfloats.FiniteOnly - Overflow policy:
Microfloats.Saturating() - Max normal:
7.5 - Min normal:
1.0 - Max subnormal:
0.875 - Min subnormal:
0.125
Microfloats.Float4_E2M1FN — Type
Float4_E2M1FNProperties
- Bits:
1sign +2exponent +1significand (4total) - Has Inf:
false - Has NaN:
false - Non-finite behavior:
Microfloats.FiniteOnly - Overflow policy:
Microfloats.Saturating() - Max normal:
6.0 - Min normal:
1.0 - Max subnormal:
0.5 - Min subnormal:
0.5