3 ms·
Oh the joys of 754: {q,s}NaNs, denormals and other cases. It's possible to describe an arbitrary IEEE754-like binary(k) and other custom formats using: S:E:I:
by anon263626 10y ago
Oh the joys of 754: {q,s}NaNs, denormals and other cases.
It's possible to describe an arbitrary IEEE754-like binary(k) and other custom formats using:
S:E:I:M (sizes S+E+I+M = k)
Where:
S sign bit, usually size 1
E exponent field
I implicit/explicit leading 1 field. usually size 0, except for some internal representations and x87
M mantissa
For standard binary(k) formats where k >= 32, the IEEE754 sizes are:
size S = 1
size E = round(4*log2(k))−13
size I = 0
size M = k-1-size E
For small formats, sizes of E and M don't follow the above rule.