Amos Professional Manual  Contents  Index

Floating Point Numbers


AMOS Professional performs all calculations using the standard library routines available from he Amiga. These library files are held in the LIBS: directory of your start-up disc.

Floating Point Libraries
In order to save memory, the floating point libraries are only installed if they are specifically needed in one of your programs. The first time that a program which contains floating point operations is tested, AMOS Professional will install the relevant libraries into memory automatically.

Normal floating point operations require the "mathffp.library", and this is usually available directly from ROM, occupying about 8k of memory space. If your program contains "transcendental" functions such as SIN, COS or SQR, then AMOS Professional will also load the mathtrans.library", which uses an additional 4k of memory. This is the reason that your disc drive may come to life from time to time, when a program is tested. Once these libraries have been installed, they will remain in memory until the end of the current programming session.

Alternatively, if a program is tested using the double precision mode, AMOS Professional will install the "mathieeedoubbas.library" and "mathieeedoubtrans.library" files instead. These require an additional 23k of valuable memory in order to operate.

Because AMOS Professional uses the standard library routines, all floating point operations speed up dramatically if a maths co-processor is installed in your Amiga. This will require different library files from those held on the AMOS Professional start-up disc, and they will only be usable when AMOS Professional is executed from the CLI or Workbench. If you attempt to boot AMOS Professional directly from the internal disc drive, you will be limited to the original, slower versions of these routines.

Here are the formats for single and double precision numbers:

Single Precision
Accuracy:      7 digits
Range:         1E-14 to 1E+15

Double Precision
Accuracy:      16 digits
Range:         10E-307 to 10E+308

Floating point numbers are fully discussed in Chapter 5.3, along with an examination of single and double precision.

Back    Next
11.03.01