Well, the first thing to remember about these binary formats
you're talking about (there were also decimal formats) is that they
are the interchange formats; it's not required that hardware, or
even software, use these for internal calculations. It's perfectly
reasonable for an implementation to use an entire separate byte for
the sign and one or more separate bytes for the exponent, if that's
felt to be a good memory vs. speed tradeoff by the designer. (And in
fact that's exactly what many 6502 floating point routines did!)
The binary interchange formats were chosen first to fit into common
modern binary machine words: 16, 32, 64, 128 and 256 bits. The next
decision to be made is the balance between exponent bits and
significant bits: too many of the former and you have a format with
perhaps more range you need and not enough precision; too many of the
latter and you have the opposite problem.
An exponent of eight bits as used by binary32 (single-precision)
interchange format gives you a binary exponent range of only −126 to
+127, which limits the absolute sizes of your values to somewhere
around 1038 decimal. That's not a bad range, but it's certainly not
enough for many applications. Reducing it to 7 bits (so that the sign
and all exponent bits could be in a single byte) would make the
problem even worse, and probably wouldn't help much with calculations
in software since you still have to split out the sign, and anybody
concerned about speed is going to use an internal format with a
separate byte for that anyway.
Once we move to binary64 (double-precision), the problem goes in the
opposite direction: increasing the 11-bit exponent to a 16-bit
exponent would give an enormous absolute range of something like
105000 decimal and, because it's "stealing" 5 bits that could
otherwise be used for more precision, would reduce precision from
almost 16 digits to just over 14. The current scheme was felt to be a
better tradeoff.
Following is a table I made a while back when I was thinking about
this topic myself. p is precision (in bits) of significand,
including an implicit leading 1
. prec is number of digits of
decimal precision (c*log₁₀(2)
), demax is the maximum exponent in
decimal (2^(e-1)-1 * log₁₀(2)
).
byt bits p e prec demax notes
2 16 11 5 3.31 4.51 IEEE 754 half precision (not basic)
3 24 16 8 4.81 38.23
3 24 17 7 5.11 18.96
3 24 18 6 5.42 9.33
3 24 19 5 5.72 4.51
4 32 24 8 7.22 38.23 IEEE 754 single precision
5 40 32 8 9.63 38.23
5 40 31 9 9.33 76.76
5 40 30 10 9.03 153.8
6 48 40 8 12.04 38.23
6 48 39 9 11.74 76.76
6 48 38 10 11.44 153.8
7 56 48 8 14.45 38.23
8 64 56 8 16.86 38.23
8 64 53 11 15.95 308.0 IEEE 754 double precision
MS 6502 BASIC shipped with 32-bit 6 digit FP (8 KB) in 1976 (8 KB),
later expanded to 40-bit 9 digit (9 KB) in 1977.