Overview of the FM package

The package performs multiple-precision real, complex, and integer arithmetic.
It provides the intrinsic Fortran numerical functions, as well as many special functions that are
not included in the Fortran standard.

One of the primary uses of the package is to study the accuracy and stability of numerical
algorithms by comparing results computed with several different levels of precision.

An existing Fortran program can be checked by converting it from double precision
to FM arithmetic. The package is designed to make this conversion fairly easy.

The precision, base, and rounding mode for the arithmetic can be set by the user.

Functions are available for conversion between multiple-precision numbers and machine-precision
numbers (single and double precision real and complex, and integer types). Mixed-mode operations
involving multiple-precision numbers and machine-precision numbers are handled automatically in
statements such as a = b - 1 or y = x/3.

There are functions for input/output operations and output formatting. Formatting functions are
very similar to Fortran's format specifications.

The package also has routines for integer multiple-precision arithmetic and functions, including
GCD, modular products and powers, and a random number generator based on 49-digit primes.

Array syntax works like Fortran's array operations in statements like v = 1, a = b + c, and
y = cos(x) when these variables are vectors or matrices of multiple precision numbers.

The program SampleFM.f95 below shows several examples of using FM for high-precision real,
complex, and integer calculations.

List of files for FMLIB 1.3: (1-7-2013 version)

Click a given file. If you directly download it, there may be an extra ".txt" filetype at the
end of the file name. Delete it. (You might also have to change "f95" to "f90" or something
else, depending on your compiler.)