GF32: a single

You will learn

The 32-bit GoldenFloat, 1 + 12 + 19, bias 2047, and the two invariants that compare it with IEEE single.

gf32.t27 holds 32 bits: 1 sign, 12 exponent, 19 mantissa bits, and bias 2047. IEEE single spends 8 bits on the exponent and 23 on the mantissa; the spec keeps two invariants that say so, EXP_BITS > 8 and MANT_BITS < 23, so GF32 trades precision for range at the same width. Its PHI_DISTANCE is 0.0135, under the test bound of 0.015, and MEMORY_RATIO_VS_FP32 is 1. A comment calls GF32 second after GF12; by the distances in this course it is closer than GF12, and GF14 is closer still.

Open the interactive lesson →