Multiple Precision Rational Arithmetic

Dr. David M. Smith
Professor of Mathematics (Emeritus)
Loyola Marymount University
Los Angeles, CA


Overview of the FM rational arithmetic package

This package performs multiple-precision exact rational arithmetic.
The basic arithmetic operations are provided, along with assignments and
logical comparisons. The functions provided are ones where the function
value is an exact rational for all rational input values.

One of the primary uses of the package is to compute exact rational solutions to linear
systems of equations or exact rational inverse matrices, so routines are provided for
those operations.

See the user manual below for a list of available operations for FM rational numbers.

The program SampleFMrational.f95 below gives examples of using FM for rational calculations.


Files for the FM rational arithmetic package:


The actual files shown on this page are in this archive that contains all the FM files from this
website: FM_files.zip

The individual file pointers here display as pdf files for browsing. The longer files are cut
off after 20 pages.


fm_rational.f95
Subroutine library for multiple-precision rational operations. 8,278 lines of code

TestFMrational.f95
Checks several operations for each of the fm_rational routines. 9,602 lines of code

SampleFMrational.f95
Small sample program using fm_rational. 708 lines of code

SampleFMrational.chk
Expected output file from SampleFMrational.f95. 398 lines

FM_Rational_User_Manual.txt
User's guide for the package, along with a list of the files, and an example set of
compiler/linker commands for building the programs. 112 lines


Back to the main FM page