> On May 3, 2024, at 5:31 PM, Sean Conner via cctalk <cctalk@classiccmp.org>
> wrote:
>
> It was thus said that the Great Steve Lewis via cctalk once stated:
>> Great discussions about BASIC. I talked about the IBM 5110 flavor of
>> BASIC last year (such as its FORM keyboard for quickly making structured
>> input forms), and recently "re-learned" that it defaults to running with
>> double-precision. But if you use "RUNS" instead of "RUN" then the same
>> code is run using single-precision (but I haven't verified yet if that
>> translates into an actual runtime speed difference). I think most of the
>> "street BASICs" used single precision (if they supported floats at all).
>> But speaking of Microsoft BASIC, I think Monte Davidoff is still around
>> and deserves a lot of credit for doing the floating point library in the
>> initial Microsoft BASIC (but it's a bit sad that history has lost the names
>> of individual contributors
>
> I think most of the "street BASICs" were written before IEEE-754 (floating
> point standard) was ratified (1985 if I recall). Microsoft's floating point
> [1] was five bytes long---four bytes for the mantissa, and one byte for the
> exponent, biased by 129. I did some tests a month ago whereby I tested the
> speed of the Microsoft floating point math on the 6809 (using Color Computer
> BASIC) vs. the Motorola 6839 (floating point ROM implementing IEEE-754), and
> the Microsoft version was faster [2].
BASIC-PLUS (part of RSTS) had a weird floating point history. The original
version, through RSTS V3, used 3-word floating point: two words mantissa, one
word exponent. Then, presumably to match the 11/45 FPU, in version 4A they
switched to your choice of 2 or 4 word float, what later in the VAX era came to
be called "F" and "D" float.
One curious thing about floating point formats of earlier computers is that
they came with wrinkles not seen either in IEEE nor in DEC float. As I recall,
the 360 is really hex float, not binary, with an exponent that gives a power of
16. CDC 6600 series mainframes used a floating point format where the mantissa
is an integer, not a fraction, and negation is done by complementing the entire
word.
The Electrologica X8 is yet another variation, which apparently came from an
academic paper of the era: it treats the mantissa as an integer too, like the
CDC 6600, but with a different normalizationn rule. THe 6600 does it like most
others: shift left until all leading zeroes have been eliminated. (It doesn't
have a "hidden bit" as DEC did.) But in the EL-X8, the normalization rule is
to make the exponent as close to zero as possible without losing bits. So an
integer value is normalized to the actual integer with exponent zero. And
since there is no "excess n" bias on the exponent, the encoding of an integer
and of the identical normalized floating point value are in fact the same.
paul