source: trunk/third/gmp/README @ 15294

Revision 15294, 3.1 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15293, which included commits to RCS files with non-trunk default branches.
Line 
1
2                        THE GNU MP LIBRARY
3
4
5GNU MP is a library for arbitrary precision arithmetic, operating on signed
6integers, rational numbers, and floating point numbers.  It has a rich set of
7functions, and the functions have a regular interface.
8
9GNU MP is designed to be as fast as possible, both for small operands and huge
10operands.  The speed is achieved by using fullwords as the basic arithmetic
11type, by using fast algorithms, with carefully optimized assembly code for the
12most common inner loops for lots of CPUs, and by a general emphasis on speed
13(instead of simplicity or elegance).
14
15GNU MP is believed to be faster than any other similar library.  Its advantage
16increases with operand sizes for certain operations, since GNU MP in many
17cases has asymptotically faster algorithms.
18
19GNU MP is free software and may be freely copied on the terms contained in the
20files COPYING.LIB and COPYING (most of GNU MP is under the former, some under
21the latter).
22
23
24
25                        OVERVIEW OF GNU MP
26
27There are five classes of functions in GNU MP.
28
29 1. Signed integer arithmetic functions (mpz).  These functions are intended
30    to be easy to use, with their regular interface.  The associated type is
31    `mpz_t'.
32
33 2. Rational arithmetic functions (mpq).  For now, just a small set of
34    functions necessary for basic rational arithmetics.  The associated type
35    is `mpq_t'.
36
37 3. Floating-point arithmetic functions (mpf).  If the C type `double'
38    doesn't give enough precision for your application, declare your
39    variables as `mpf_t' instead, set the precision to any number desired,
40    and call the functions in the mpf class for the arithmetic operations.
41
42 4. Positive-integer, hard-to-use, very low overhead functions are in the
43    mpn class.  No memory management is performed.  The caller must ensure
44    enough space is available for the results.  The set of functions is not
45    regular, nor is the calling interface.  These functions accept input
46    arguments in the form of pairs consisting of a pointer to the least
47    significant word, and an integral size telling how many limbs (= words)
48    the pointer points to.
49
50    Almost all calculations, in the entire package, are made by calling these
51    low-level functions.
52
53 5. Berkeley MP compatible functions.
54
55    To use these functions, include the file "mp.h".  You can test if you are
56    using the GNU version by testing if the symbol __GNU_MP__ is defined.
57
58For more information on how to use GNU MP, please refer to the documentation.
59It is composed from the file gmp.texi, and can be displayed on the screen or
60printed.  How to do that, as well how to build the library, is described in
61the INSTALL file in this directory.
62
63
64
65                        REPORTING BUGS
66
67If you find a bug in the library, please make sure to tell us about it!
68
69You should first check the GNU MP web pages at http://www.swox.com/gmp/,
70under "Status of the current release".  There will be patches for all known
71serious bugs there.
72
73Report bugs to bug-gmp@gnu.org.  What information is needed in a good bug
74report is described in the manual.  The same address can be used for
75suggesting modifications and enhancements.
76
77
78
79
80----------------
81Local variables:
82mode: text
83fill-column: 78
84End:
Note: See TracBrowser for help on using the repository browser.