Contents | < Browse | Browse >
12D. float implementation issues
--------------------------------
As said before, the E float format is IEEE (single), this means that
older float code using the FFP format with the SpXxx functions will
have to be rewritten (as stated in the v2.1b docs). The mathffp
library is no longer directly supported by EC starting from v3.0, and
you'll have to open this library like all others if you want to use it.

single IEEE's were chosen because:
- double IEEE's don't fit in a LONG
- the FFP format routines do not make use of a 68881 if present,
  the IEEE ones do. Furthermore the FFP format is incompatible
  with the 68881, which also uses IEEE format.
- IEEE is the worldwide float-format standard, which encourages
  data-file compatability among software/platforms.

E's float routines use the mathieeesingbas.library and the
mathieeesingtrans.library, which are not by default supplied
with the ancient v1.3 of the OS. This means that if you want
to write under / support 1.3 AND you want to use the _builtin_
floats, you have to make sure these libraries are present (they
seem to be available, maybe through commodore?).

Both EC and the programs it generates do not open these libraries
as long as no float-features are used.

If all else fails, one can always use other floatlibraries to use
floats with 1.3. I might recommend the tools/longreal.m module
which uses doubles.

In the future, EC will probably allow mathieee library calls to
be replaced with inline 68881 code transparently.



The bug in mathieeesingbas.library.

v3.1 (v40) of the amiga operating system is known to contain a bug in the IEEE
code of the divide and multiply functions.  If you're using E floats under
this version of the OS you will need to run a patch that fixes this otherwise
you may provoke crashes.  Even worse, even if you program under another
version of the OS, if your program uses these float operations, you will have
to notify your users to use this patch, otherwise your programs may fail on
other peoples machines.  I've included SetPatch v43.6 in this distribution
which fixes the problem (Bin/SetPatch/).  Another suitable patch is for
example util/boot/PatchMathSB10.lha on Aminet (or CD #7).  As far as EC
itself is concerned, if EC has to use one of these operations (for example
for float constants) it will warn you that you are not running the patch.