[comp.sys.atari.st] MWC and VAX floating-point format

rowley@ORVILLE.ARPA (Karl Rowley) (06/17/87)

The reason why MWC chose the VAX floating-point format has been questioned.

VAX double-precision format is identical to single-precision format, except
that the mantissa is extended.  The IEEE format does not have this property.
A floating-point library to use the VAX format is simplified by this 
similarity.  

In addition, all function arguments of type float are converted to doubles 
before they are put on the stack in MWC.  Conversion from floats to doubles 
and back is certainly simple enough in VAX format.

In other words, implementing the VAX floating-point format in software is
probably simpler than implementing the IEEE format in software.

Of course, IEEE format is superior in many ways, and doesn't have its bytes
all flipped around.



Karl Rowley
rowley@orville.nas.nasa.gov

manis@ubc-cs.UUCP (06/19/87)

In article <8706171715.AA08471@orville.arpa> rowley@ORVILLE.ARPA.UUCP (Karl
Rowley) writes:

>VAX double-precision format is identical to single-precision format, except
>that the mantissa is extended.  The IEEE format does not have this property.

Actually (not really being an expert in these matters) I believe that what 
MWC uses is the old PDP-11 format. VAXen nowadays have 4 (!) formats, of
which MWC appears to use F (single) and D (old double) precision. Not having
the VAX G format (less than double, but with more exponent bits) is something
of a lose, in that one gets possibly more precision, but no more range.
Since I rarely use floating point, I don't care that much. However, not
having the same format as used by other ST languages is a bit of an
annoyance, as is the inability to support coprocessors.

>Of course, IEEE format is superior in many ways, and doesn't have its bytes
>all flipped around.

They could have done *much* worse. The 370 has its own floating point format.

-----
Vincent Manis                {seismo,uw-beaver}!ubc-vision!ubc-cs!manis
Dept. of Computer Science    manis@cs.ubc.cdn
Univ. of British Columbia    manis%ubc.csnet@csnet-relay.arpa  
Vancouver, B.C. V6T 1W5      manis@ubc.csnet
(604) 228-6770 or 228-3061

"To lose one parent, Mr Worthing, may be regarded as a misfortune; but
to lose both looks like carelessness." -- Oscar Wilde