>> The M68000 Family Programmer's Reference Manual (which covers the
>> 68040) states the range of a double precision real as 2.2 x 10^-308 to
>> 1.8 x 10^308. It is an eight byte format as shown:
>
>This has nothing to do the with QL FP format. The format QDOS uses is
>not IEEE compatible.
IIRC the QL uses a 32-bit signed mantissa (not a fraction), with a 12-bit
exponent (although they could have used a 15-bit exponent!). That would put
the range at rougly 2^(+/-4096) with slightly over 9 digit precision, the
largest magnitude number would be cca 1E616, the smallest 1E-625 (the later
with less than a digit of precision!). I would trust Marcel's calculation
over mine, though, he's just recently looked at the code, and I'm trying to
remember things from a good decade ago at least. The easyest 68k FPU format
to convert to/from Ql format is the 80-bit extended format.
Normalisation: The process of converting the mantissa to a represenattion
which offers the best precision. Basically, the mantissa is shifted left
until there is a 1 in the MSB position, and for every shift the exponent is
reduced by 1. This means that by definition, the MSB in the mantissa will
therefore always end up being 1, and all mantisae will be look something
like 1.xxxxxxxx. There is no sense in storing the 1 - it is implied.
Instead, only the .xxxxxxxx part is stored, which is why it is called a
'fraction' and not a mantissa. This 'bit-saving' is important for formats
that store the mantissa in a number of bits that is later expanded to a
data type more likely to be found in a common CPU - such as a long word, or
two long words. On the QL the mantissa is already 32 bits, which is the
largest CPU-native data type. Since the mantissa is not going to be
expanded, on the QL the implied 1, IIRC, is not removed, so the mantissa is
really a mantissa, not a fraction.
Nasta