Next: , Previous: , Up: Top   [Index]


1 Introduction to MPIR

MPIR is a portable library written in C for arbitrary precision arithmetic on integers, rational numbers, and floating-point numbers. It aims to provide the fastest possible arithmetic for all applications that need higher precision than is directly supported by the basic C types.

Many applications use just a few hundred bits of precision; but some applications may need thousands or even millions of bits. MPIR is designed to give good performance for both, by choosing algorithms based on the sizes of the operands, and by carefully keeping the overhead at a minimum.

The speed of MPIR is achieved by using fullwords as the basic arithmetic type, by using sophisticated algorithms, by including carefully optimized assembly code for the most common inner loops for many different CPUs, and by a general emphasis on speed (as opposed to simplicity or elegance).

There is assembly code for these CPUs: ARM, DEC Alpha 21064, 21164, and 21264, AMD K6, K6-2, Athlon, K8 and K10, Intel Pentium, Pentium Pro/II/III, Pentium 4, generic x86, Intel IA-64, Core 2, i7, Atom, Motorola/IBM PowerPC 32 and 64, MIPS R3000, R4000, SPARCv7, SuperSPARC, generic SPARCv8, UltraSPARC,

For up-to-date information on, and latest version of, MPIR, please see the MPIR web pages at

http://www.mpir.org/

There are a number of public mailing lists of interest. The development list is

http://groups.google.com/group/mpir-devel/.

The proper place for bug reports is http://groups.google.com/group/mpir-devel. See Reporting Bugs for information about reporting bugs.


1.1 How to use this Manual

Everyone should read MPIR Basics. If you need to install the library yourself, then read Installing MPIR. If you have a system with multiple ABIs, then read ABI and ISA, for the compiler options that must be used on applications. In addition to usual compilation tools, MPIR depends on Yasm to be built. If yasm is not available on your system, you can download its sources at

http://yasm.tortall.net/Download.html

build your own version and make it available to MPIR configuration system by passing its path to configure through the ‘--with-yasm’ option. See Build Options for further details.

The rest of the manual can be used for later reference, although it is probably a good idea to glance through it.


Next: , Previous: , Up: Top   [Index]