Bug 54: Float8 To Float32 With A Fault
- This converts an 8-bit non-standard E4M3 float to a 32-bit IEEE 754 binary32 (single-precision) float.
- An E4M3 float has (from most- to least-significant): 1 sign bit, 4 exponent bits, and 3 mantissa bits.
- If the E4M3 exponent is zero, the E4M3 is either zero or subnormal: Nonzero mantissa makes a subnormal.
- E4M3 signed zero becomes binary32 signed zero. E4M3 subnormals are converted to normalized binary32.
- E4M3 cannot encode infinities. E4M3 has exactly two NaN bit patterns: all exponent/mantissa bits are 1.
- E4M3 exponents are rebiased by subtracting the E4M3 bias (7) and adding the binary32 bias (127).
- There are only 256 E4M3 bit patterns, so conversion is performed using a precomputed lookup table.
Fix The Tiny Bug In This Go Code: