Multiple Precision Computation

Dr. David M. Smith
Professor of Mathematics
Loyola Marymount University
7900 Loyola Blvd.
Los Angeles, CA 90045-8130
Office: 2763 University Hall
Telephone: 310-338-5105
Fax: 310-338-3768


Web search keyword: dsmithfmlibrary



FMLIB is a package of Fortran routines for real arithmetic and elementary functions. The precision and base for the arithmetic can be set by the user, and routines are available for floating-point arithmetic, conversion and input/output operations, trigonometric, exponential, logarithmic, and hyperbolic functions.

The package also has routines for integer multiple-precision arithmetic and functions, including GCD and modular powers.

ZMLIB is a package of Fortran routines for complex arithmetic and elementary functions. The options and functions supported are similar to FMLIB.

FMZM90 is a Fortran-90 module that defines three derived types: multiple-precision real, multiple-precision integer, and multiple-precision complex. Interfaces are provided so that a program can declare variables to be multiple-precision types and then write the code for multiple-precision operations using normal Fortran syntax.


Example using FMLIB in Fortran-77:

...

PARAMETER ( ... LUNPCK = ...

COMMON /FM ...

DOUBLE PRECISION A(0:LUNPCK),B(0:LUNPCK),C(0:LUNPCK)

DOUBLE PRECISION D(0:LUNPCK),TEMP(0:LUNPCK)

...

CALL FMSQR(A,TEMP)

CALL FMSQR(B,D)

CALL FMADD(D,TEMP,D)

CALL FMSQR(C,TEMP)

CALL FMADD(D,TEMP,D)

CALL FMSQRT(D,D)

...


The same example using FMLIB and FMZM90 in Fortran-90:

...

USE FMZM

TYPE ( FM ) A,B,C,D

...

D = SQRT( A**2 + B**2 + C**2 )

...


List of files: (5-19-97 version)

FMZM.tar.gz
A gzipped tar file containing all 14 files listed below, and a postscript version of the "Multiple Precision Complex Arithmetic and Functions" paper. (520K)

Here are the individual source code files:

1-4-06: The server is not able to find files with "f" or other uncommon filetypes. Until this is fixed, here is a workaround:

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.

FMLIB.f
Subroutine library for real operations. 24,918 lines of code

TESTFM.f
Test program for most of the FM routines. 2,224 lines of code

FMSAMPLE.f
Small sample program using FM. 333 lines of code

FMSAMPLE.CHK
Expected output file from FMSAMPLE.f. 35 lines

ZMLIB.f
Subroutine library for complex operations. 9,249 lines of code

TESTZM.f
Test program for most of the ZM routines. 1,413 lines of code

ZMSAMPLE.f
Small sample program using ZM. 262 lines of code

ZMSAMPLE.CHK
Expected output file from ZMSAMPLE.f. 27 lines

FMZM90.f
Fortran-90 interface module. 7,453 lines of code

FMZMCOMM.f
Fortran-90 module for common blocks. 148 lines of code

Test90.f
Test program for FMZM90. 4,220 lines of code

Sample90.f
Small sample program using FMZM90. 378 lines of code

SAMPLE90.CHK
Expected output file from SAMPLE90.f. 59 lines

ReadMe
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. 1,493 lines


PAPERS ONLINE (in postscript format -- best for printing)

Efficient Multiple-Precision Evaluation of Elementary Functions
Mathematics of Computation 52 (1989) 131 -- 134

A Fortran Package For Floating-Point Multiple-Precision Arithmetic
Transactions on Mathematical Software 17 (1991) 273 -- 283

A Multiple-Precision Division Algorithm
Mathematics of Computation 66 (1996) 157 -- 163

Multiple Precision Complex Arithmetic and Functions
Transactions on Mathematical Software 24 (1998) 359 -- 367


PAPERS ONLINE (individual pages can be viewed with a browser)

Efficient Multiple-Precision Evaluation of Elementary Functions
Mathematics of Computation 52 (1989) 131 -- 134
Page 1, 2, 3, 4

A Fortran Package For Floating-Point Multiple-Precision Arithmetic
Transactions on Mathematical Software 17 (1991) 273 -- 283
Page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

A Multiple-Precision Division Algorithm
Mathematics of Computation 66 (1996) 157 -- 163
Page 1, 2, 3, 4, 5, 6, 7, 8

Multiple Precision Complex Arithmetic and Functions
Transactions on Mathematical Software 24 (1998) 359 -- 367
Page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10