The floating-point routines for Microsoft BASIC were written by Monte Davidoff in 1975, originally for the Altair, which used an Intel 8080 CPU. The source code had been lost for years, until Bill Gates’ former tutor discovered a copy in 2000 that had fallen behind his file cabinet two decades before.
Davidoff needed to invent his own floating-point format, and came up with: 8 exponent bits (bias-128), 1 sign bit, and 23 normalized mantissa bits. This was similar to DEC VAX single-precision floating-point numbers, but laid out in a more logical order.
In 1976, Gates, Allen and Davidoff wrote a 6502 version of their BASIC. When they were unable to fit it into 8K, they decided to put it in a larger ROM chip and add more features, including an “extended” 40-bit floating-point format. They chose to keep eight-bit exponents on the 8-bit CPU and extend the precision of the mantissa. Although Wozniak had already written Integer BASIC and was at that time working on a floating-point BASIC, he was also working on other projects at the same time. Steve Jobs felt it was taking too long and bought Microsoft’s instead. In Woz’s recollection:
My design style is to spend quite a bit of time thinking out every angle in my head and in rough sketches, and then to start coding. The first results aren’t visible right away, but at the end they come up very quickly. Steve Jobs got concerned that I wasn’t making enough progress. He even accused me of slacking and coming in at 10 AM in one staff meeting, but I pointed out that I’d been laying out our floppy PC Card [...] and that I’d been leaving at 4 AM every morning, long after even the Houston brothers, Dick and Cliff, had left.
Microsoft’s MBASIC for CP/M and its GWBASIC for MS-DOS were originally based on its 8080 BASIC for Altair, and used its 32-bit format at first, but went through several floating-point formats (including packed BCD in the Xenix version) before switching to IEEE format in GWBASIC 4.
When Sophie Wilson wrote the original BBC Micro BASIC for the 6502, and Richard T. Russell ported it to the Z80 in 1986, and later to several other machines (crediting Wilson as “the genius” behind the BBC Micro BASIC), they gave its “reals” the same range as Microsoft’s extended floating-point numbers. (Wilson’s previous BASIC, for the Acorn Atom, did not support floating-point.) In Russell’s words, “What we now know as BBC BASIC arose as the result of a compromise between what Acorn were already planning to produce and the BBC's desire for a ‘standard’ language. Programs written for Microsoft BASIC required little or no alteration to run on BBC BASIC, but programs written specifically for BBC BASIC could take advantage of its more sophisticated features.” BASIC VI for the ARM replaced the earlier number formats, which would have required unaligned memory access on a 32-bit RISC system, with 32-bit integers and 64-bit reals.
The Spectrum BASIC was an extension of the ZX81 BASIC by Steven Vickers, which was written at the same time as BBC BASIC. Vickers later said, “The only firm brief for the [ZX]81 was that the [ZX]80’s math package must be improved,” so it is likely that Sinclair wanted it to be able to match the floating-point precision of its competitors, such as the TRS-80 with its Microsoft BASIC. Several other British computers, including Sinclair’s notebooks in 1988, used a BASIC by Russell derived from BBC Basic.