Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102a/doc/misc/float.doc
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

67 lines
1.7 KiB
Plaintext

float - floating point number formats
Regulus supports two formats of single precision floating
point numbers. They are the Motorola 'Fast Floating Point' and
the 'IEEE standard'. Both types are stored in 32-bit entities.
They are not compatible.
The FFP format consists of a 24 bit mantissa, 1 bit of
sign, and 7 bits of exponent. The exponent is stored in it's
two's complement form.
[ | | | | | | | ~~~~ | | | | | | | | | | | | | | | | ]
|------------ Mantissa --------------|S|---- Exp ----|
The IEEE format consists of 1 sign bit, 8 bits of exponent, and
23 bits of mantissa. The exponent is store in it's Excess 127
format.
[ | | | | | | | | | | | | | | | ~~~~ | | | | | | | | ]
|S|----- Exp -----|---------- Mantissa --------------|
The floating point numbers represented by the IEEE format are :
(-1)^S * 1.F * 2^E, the FFP floating point numbers are of the
form : (-1)^S * 0.F * 2^E.
The IEEE format will be used if the -e flag is given to the
compiler or if the -lE flag is given to the loader. The FFP
format will be used if the -f flag is given to the compiler or
if the -lF flag is given to the loader. These flags cause
floating point constants of the appropriate flavor to be gen-
erated and the appropriate library to be loaded.
The IEEE floating point values lose some precision due to
the fact that calculations use the fast floating point routines,
and a translation to and from the FFP format. cc(cmnd),
lo(cmnd)