source: trunk/third/gmp/gmp.info-2 @ 22254

Revision 22254, 94.2 KB checked in by ghudson, 19 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r22253, which included commits to RCS files with non-trunk default branches.
Line 
1This is gmp.info, produced by makeinfo version 4.6 from gmp.texi.
2
3This manual describes how to install and use the GNU multiple precision
4arithmetic library, version 4.1.4.
5
6   Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
72001, 2002, 2003, 2004 Free Software Foundation, Inc.
8
9   Permission is granted to copy, distribute and/or modify this
10document under the terms of the GNU Free Documentation License, Version
111.1 or any later version published by the Free Software Foundation;
12with no Invariant Sections, with the Front-Cover Texts being "A GNU
13Manual", and with the Back-Cover Texts being "You have freedom to copy
14and modify this GNU Manual, like GNU software".  A copy of the license
15is included in *Note GNU Free Documentation License::.
16INFO-DIR-SECTION GNU libraries
17START-INFO-DIR-ENTRY
18* gmp: (gmp).                   GNU Multiple Precision Arithmetic Library.
19END-INFO-DIR-ENTRY
20
21
22File: gmp.info,  Node: Assembler Floating Point,  Next: Assembler SIMD Instructions,  Prev: Assembler Cache Handling,  Up: Assembler Coding
23
24Floating Point
25--------------
26
27Floating point arithmetic is used in GMP for multiplications on CPUs
28with poor integer multipliers.  It's mostly useful for `mpn_mul_1',
29`mpn_addmul_1' and `mpn_submul_1' on 64-bit machines, and
30`mpn_mul_basecase' on both 32-bit and 64-bit machines.
31
32   With IEEE 53-bit double precision floats, integer multiplications
33producing up to 53 bits will give exact results.  Breaking a 64x64
34multiplication into eight 16x32->48 bit pieces is convenient.  With
35some care though six 21x32->53 bit products can be used, if one of the
36lower two 21-bit pieces also uses the sign bit.
37
38   For the `mpn_mul_1' family of functions on a 64-bit machine, the
39invariant single limb is split at the start, into 3 or 4 pieces.
40Inside the loop, the bignum operand is split into 32-bit pieces.  Fast
41conversion of these unsigned 32-bit pieces to floating point is highly
42machine-dependent.  In some cases, reading the data into the integer
43unit, zero-extending to 64-bits, then transferring to the floating
44point unit back via memory is the only option.
45
46   Converting partial products back to 64-bit limbs is usually best
47done as a signed conversion.  Since all values are smaller than 2^53,
48signed and unsigned are the same, but most processors lack unsigned
49conversions.
50
51
52
53   Here is a diagram showing 16x32 bit products for an `mpn_mul_1' or
54`mpn_addmul_1' with a 64-bit limb.  The single limb operand V is split
55into four 16-bit parts.  The multi-limb operand U is split in the loop
56into two 32-bit parts.
57
58                     +---+---+---+---+
59                     |v48|v32|v16|v00|    V operand
60                     +---+---+---+---+
61     
62                     +-------+---+---+
63                 x   |  u32  |  u00  |    U operand (one limb)
64                     +---------------+
65     
66     ---------------------------------
67     
68                         +-----------+
69                         | u00 x v00 |    p00    48-bit products
70                         +-----------+
71                     +-----------+
72                     | u00 x v16 |        p16
73                     +-----------+
74                 +-----------+
75                 | u00 x v32 |            p32
76                 +-----------+
77             +-----------+
78             | u00 x v48 |                p48
79             +-----------+
80                 +-----------+
81                 | u32 x v00 |            r32
82                 +-----------+
83             +-----------+
84             | u32 x v16 |                r48
85             +-----------+
86         +-----------+
87         | u32 x v32 |                    r64
88         +-----------+
89     +-----------+
90     | u32 x v48 |                        r80
91     +-----------+
92
93   p32 and r32 can be summed using floating-point addition, and
94likewise p48 and r48.  p00 and p16 can be summed with r64 and r80 from
95the previous iteration.
96
97   For each loop then, four 49-bit quantities are transfered to the
98integer unit, aligned as follows,
99
100     |-----64bits----|-----64bits----|
101                        +------------+
102                        | p00 + r64' |    i00
103                        +------------+
104                    +------------+
105                    | p16 + r80' |        i16
106                    +------------+
107                +------------+
108                | p32 + r32  |            i32
109                +------------+
110            +------------+
111            | p48 + r48  |                i48
112            +------------+
113
114   The challenge then is to sum these efficiently and add in a carry
115limb, generating a low 64-bit result limb and a high 33-bit carry limb
116(i48 extends 33 bits into the high half).
117
118
119File: gmp.info,  Node: Assembler SIMD Instructions,  Next: Assembler Software Pipelining,  Prev: Assembler Floating Point,  Up: Assembler Coding
120
121SIMD Instructions
122-----------------
123
124The single-instruction multiple-data support in current microprocessors
125is aimed at signal processing algorithms where each data point can be
126treated more or less independently.  There's generally not much support
127for propagating the sort of carries that arise in GMP.
128
129   SIMD multiplications of say four 16x16 bit multiplies only do as much
130work as one 32x32 from GMP's point of view, and need some shifts and
131adds besides.  But of course if say the SIMD form is fully pipelined
132and uses less instruction decoding then it may still be worthwhile.
133
134   On the 80x86 chips, MMX has so far found a use in `mpn_rshift' and
135`mpn_lshift' since it allows 64-bit operations, and is used in a special
136case for 16-bit multipliers in the P55 `mpn_mul_1'.  3DNow and SSE
137haven't found a use so far.
138
139
140File: gmp.info,  Node: Assembler Software Pipelining,  Next: Assembler Loop Unrolling,  Prev: Assembler SIMD Instructions,  Up: Assembler Coding
141
142Software Pipelining
143-------------------
144
145Software pipelining consists of scheduling instructions around the
146branch point in a loop.  For example a loop taking a checksum of an
147array of limbs might have a load and an add, but the load wouldn't be
148for that add, rather for the one next time around the loop.  Each load
149then is effectively scheduled back in the previous iteration, allowing
150latency to be hidden.
151
152   Naturally this is wanted only when doing things like loads or
153multiplies that take a few cycles to complete, and only where a CPU has
154multiple functional units so that other work can be done while waiting.
155
156   A pipeline with several stages will have a data value in progress at
157each stage and each loop iteration moves them along one stage.  This is
158like juggling.
159
160   Within the loop some moves between registers may be necessary to
161have the right values in the right places for each iteration.  Loop
162unrolling can help this, with each unrolled block able to use different
163registers for different values, even if some shuffling is still needed
164just before going back to the top of the loop.
165
166
167File: gmp.info,  Node: Assembler Loop Unrolling,  Prev: Assembler Software Pipelining,  Up: Assembler Coding
168
169Loop Unrolling
170--------------
171
172Loop unrolling consists of replicating code so that several limbs are
173processed in each loop.  At a minimum this reduces loop overheads by a
174corresponding factor, but it can also allow better register usage, for
175example alternately using one register combination and then another.
176Judicious use of `m4' macros can help avoid lots of duplication in the
177source code.
178
179   Unrolling is commonly done to a power of 2 multiple so the number of
180unrolled loops and the number of remaining limbs can be calculated with
181a shift and mask.  But other multiples can be used too, just by
182subtracting each N limbs processed from a counter and waiting for less
183than N remaining (or offsetting the counter by N so it goes negative
184when there's less than N remaining).
185
186   The limbs not a multiple of the unrolling can be handled in various
187ways, for example
188
189   * A simple loop at the end (or the start) to process the excess.
190     Care will be wanted that it isn't too much slower than the
191     unrolled part.
192
193   * A set of binary tests, for example after an 8-limb unrolling, test
194     for 4 more limbs to process, then a further 2 more or not, and
195     finally 1 more or not.  This will probably take more code space
196     than a simple loop.
197
198   * A `switch' statement, providing separate code for each possible
199     excess, for example an 8-limb unrolling would have separate code
200     for 0 remaining, 1 remaining, etc, up to 7 remaining.  This might
201     take a lot of code, but may be the best way to optimize all cases
202     in combination with a deep pipelined loop.
203
204   * A computed jump into the middle of the loop, thus making the first
205     iteration handle the excess.  This should make times smoothly
206     increase with size, which is attractive, but setups for the jump
207     and adjustments for pointers can be tricky and could become quite
208     difficult in combination with deep pipelining.
209
210   One way to write the setups and finishups for a pipelined unrolled
211loop is simply to duplicate the loop at the start and the end, then
212delete instructions at the start which have no valid antecedents, and
213delete instructions at the end whose results are unwanted.  Sizes not a
214multiple of the unrolling can then be handled as desired.
215
216
217File: gmp.info,  Node: Internals,  Next: Contributors,  Prev: Algorithms,  Up: Top
218
219Internals
220*********
221
222*This chapter is provided only for informational purposes and the
223various internals described here may change in future GMP releases.
224Applications expecting to be compatible with future releases should use
225only the documented interfaces described in previous chapters.*
226
227* Menu:
228
229* Integer Internals::
230* Rational Internals::
231* Float Internals::
232* Raw Output Internals::
233* C++ Interface Internals::
234
235
236File: gmp.info,  Node: Integer Internals,  Next: Rational Internals,  Prev: Internals,  Up: Internals
237
238Integer Internals
239=================
240
241`mpz_t' variables represent integers using sign and magnitude, in space
242dynamically allocated and reallocated.  The fields are as follows.
243
244`_mp_size'
245     The number of limbs, or the negative of that when representing a
246     negative integer.  Zero is represented by `_mp_size' set to zero,
247     in which case the `_mp_d' data is unused.
248
249`_mp_d'
250     A pointer to an array of limbs which is the magnitude.  These are
251     stored "little endian" as per the `mpn' functions, so `_mp_d[0]'
252     is the least significant limb and `_mp_d[ABS(_mp_size)-1]' is the
253     most significant.  Whenever `_mp_size' is non-zero, the most
254     significant limb is non-zero.
255
256     Currently there's always at least one limb allocated, so for
257     instance `mpz_set_ui' never needs to reallocate, and `mpz_get_ui'
258     can fetch `_mp_d[0]' unconditionally (though its value is then
259     only wanted if `_mp_size' is non-zero).
260
261`_mp_alloc'
262     `_mp_alloc' is the number of limbs currently allocated at `_mp_d',
263     and naturally `_mp_alloc >= ABS(_mp_size)'.  When an `mpz' routine
264     is about to (or might be about to) increase `_mp_size', it checks
265     `_mp_alloc' to see whether there's enough space, and reallocates
266     if not.  `MPZ_REALLOC' is generally used for this.
267
268   The various bitwise logical functions like `mpz_and' behave as if
269negative values were twos complement.  But sign and magnitude is always
270used internally, and necessary adjustments are made during the
271calculations.  Sometimes this isn't pretty, but sign and magnitude are
272best for other routines.
273
274   Some internal temporary variables are setup with `MPZ_TMP_INIT' and
275these have `_mp_d' space obtained from `TMP_ALLOC' rather than the
276memory allocation functions.  Care is taken to ensure that these are
277big enough that no reallocation is necessary (since it would have
278unpredictable consequences).
279
280
281File: gmp.info,  Node: Rational Internals,  Next: Float Internals,  Prev: Integer Internals,  Up: Internals
282
283Rational Internals
284==================
285
286`mpq_t' variables represent rationals using an `mpz_t' numerator and
287denominator (*note Integer Internals::).
288
289   The canonical form adopted is denominator positive (and non-zero),
290no common factors between numerator and denominator, and zero uniquely
291represented as 0/1.
292
293   It's believed that casting out common factors at each stage of a
294calculation is best in general.  A GCD is an O(N^2) operation so it's
295better to do a few small ones immediately than to delay and have to do
296a big one later.  Knowing the numerator and denominator have no common
297factors can be used for example in `mpq_mul' to make only two cross
298GCDs necessary, not four.
299
300   This general approach to common factors is badly sub-optimal in the
301presence of simple factorizations or little prospect for cancellation,
302but GMP has no way to know when this will occur.  As per *Note
303Efficiency::, that's left to applications.  The `mpq_t' framework might
304still suit, with `mpq_numref' and `mpq_denref' for direct access to the
305numerator and denominator, or of course `mpz_t' variables can be used
306directly.
307
308
309File: gmp.info,  Node: Float Internals,  Next: Raw Output Internals,  Prev: Rational Internals,  Up: Internals
310
311Float Internals
312===============
313
314Efficient calculation is the primary aim of GMP floats and the use of
315whole limbs and simple rounding facilitates this.
316
317   `mpf_t' floats have a variable precision mantissa and a single
318machine word signed exponent.  The mantissa is represented using sign
319and magnitude.
320
321        most                   least
322     significant            significant
323        limb                   limb
324     
325                                 _mp_d
326      |---- _mp_exp --->           |
327       _____ _____ _____ _____ _____
328      |_____|_____|_____|_____|_____|
329                        . <------------ radix point
330     
331       <-------- _mp_size --------->
332
333The fields are as follows.
334
335`_mp_size'
336     The number of limbs currently in use, or the negative of that when
337     representing a negative value.  Zero is represented by `_mp_size'
338     and `_mp_exp' both set to zero, and in that case the `_mp_d' data
339     is unused.  (In the future `_mp_exp' might be undefined when
340     representing zero.)
341
342`_mp_prec'
343     The precision of the mantissa, in limbs.  In any calculation the
344     aim is to produce `_mp_prec' limbs of result (the most significant
345     being non-zero).
346
347`_mp_d'
348     A pointer to the array of limbs which is the absolute value of the
349     mantissa.  These are stored "little endian" as per the `mpn'
350     functions, so `_mp_d[0]' is the least significant limb and
351     `_mp_d[ABS(_mp_size)-1]' the most significant.
352
353     The most significant limb is always non-zero, but there are no
354     other restrictions on its value, in particular the highest 1 bit
355     can be anywhere within the limb.
356
357     `_mp_prec+1' limbs are allocated to `_mp_d', the extra limb being
358     for convenience (see below).  There are no reallocations during a
359     calculation, only in a change of precision with `mpf_set_prec'.
360
361`_mp_exp'
362     The exponent, in limbs, determining the location of the implied
363     radix point.  Zero means the radix point is just above the most
364     significant limb.  Positive values mean a radix point offset
365     towards the lower limbs and hence a value >= 1, as for example in
366     the diagram above.  Negative exponents mean a radix point further
367     above the highest limb.
368
369     Naturally the exponent can be any value, it doesn't have to fall
370     within the limbs as the diagram shows, it can be a long way above
371     or a long way below.  Limbs other than those included in the
372     `{_mp_d,_mp_size}' data are treated as zero.
373
374
375The following various points should be noted.
376
377Low Zeros
378     The least significant limbs `_mp_d[0]' etc can be zero, though
379     such low zeros can always be ignored.  Routines likely to produce
380     low zeros check and avoid them to save time in subsequent
381     calculations, but for most routines they're quite unlikely and
382     aren't checked.
383
384Mantissa Size Range
385     The `_mp_size' count of limbs in use can be less than `_mp_prec' if
386     the value can be represented in less.  This means low precision
387     values or small integers stored in a high precision `mpf_t' can
388     still be operated on efficiently.
389
390     `_mp_size' can also be greater than `_mp_prec'.  Firstly a value is
391     allowed to use all of the `_mp_prec+1' limbs available at `_mp_d',
392     and secondly when `mpf_set_prec_raw' lowers `_mp_prec' it leaves
393     `_mp_size' unchanged and so the size can be arbitrarily bigger than
394     `_mp_prec'.
395
396Rounding
397     All rounding is done on limb boundaries.  Calculating `_mp_prec'
398     limbs with the high non-zero will ensure the application requested
399     minimum precision is obtained.
400
401     The use of simple "trunc" rounding towards zero is efficient,
402     since there's no need to examine extra limbs and increment or
403     decrement.
404
405Bit Shifts
406     Since the exponent is in limbs, there are no bit shifts in basic
407     operations like `mpf_add' and `mpf_mul'.  When differing exponents
408     are encountered all that's needed is to adjust pointers to line up
409     the relevant limbs.
410
411     Of course `mpf_mul_2exp' and `mpf_div_2exp' will require bit
412     shifts, but the choice is between an exponent in limbs which
413     requires shifts there, or one in bits which requires them almost
414     everywhere else.
415
416Use of `_mp_prec+1' Limbs
417     The extra limb on `_mp_d' (`_mp_prec+1' rather than just
418     `_mp_prec') helps when an `mpf' routine might get a carry from its
419     operation.  `mpf_add' for instance will do an `mpn_add' of
420     `_mp_prec' limbs.  If there's no carry then that's the result, but
421     if there is a carry then it's stored in the extra limb of space and
422     `_mp_size' becomes `_mp_prec+1'.
423
424     Whenever `_mp_prec+1' limbs are held in a variable, the low limb
425     is not needed for the intended precision, only the `_mp_prec' high
426     limbs.  But zeroing it out or moving the rest down is unnecessary.
427     Subsequent routines reading the value will simply take the high
428     limbs they need, and this will be `_mp_prec' if their target has
429     that same precision.  This is no more than a pointer adjustment,
430     and must be checked anyway since the destination precision can be
431     different from the sources.
432
433     Copy functions like `mpf_set' will retain a full `_mp_prec+1' limbs
434     if available.  This ensures that a variable which has `_mp_size'
435     equal to `_mp_prec+1' will get its full exact value copied.
436     Strictly speaking this is unnecessary since only `_mp_prec' limbs
437     are needed for the application's requested precision, but it's
438     considered that an `mpf_set' from one variable into another of the
439     same precision ought to produce an exact copy.
440
441Application Precisions
442     `__GMPF_BITS_TO_PREC' converts an application requested precision
443     to an `_mp_prec'.  The value in bits is rounded up to a whole limb
444     then an extra limb is added since the most significant limb of
445     `_mp_d' is only non-zero and therefore might contain only one bit.
446
447     `__GMPF_PREC_TO_BITS' does the reverse conversion, and removes the
448     extra limb from `_mp_prec' before converting to bits.  The net
449     effect of reading back with `mpf_get_prec' is simply the precision
450     rounded up to a multiple of `mp_bits_per_limb'.
451
452     Note that the extra limb added here for the high only being
453     non-zero is in addition to the extra limb allocated to `_mp_d'.
454     For example with a 32-bit limb, an application request for 250
455     bits will be rounded up to 8 limbs, then an extra added for the
456     high being only non-zero, giving an `_mp_prec' of 9.  `_mp_d' then
457     gets 10 limbs allocated.  Reading back with `mpf_get_prec' will
458     take `_mp_prec' subtract 1 limb and multiply by 32, giving 256
459     bits.
460
461     Strictly speaking, the fact the high limb has at least one bit
462     means that a float with, say, 3 limbs of 32-bits each will be
463     holding at least 65 bits, but for the purposes of `mpf_t' it's
464     considered simply to be 64 bits, a nice multiple of the limb size.
465
466
467File: gmp.info,  Node: Raw Output Internals,  Next: C++ Interface Internals,  Prev: Float Internals,  Up: Internals
468
469Raw Output Internals
470====================
471
472`mpz_out_raw' uses the following format.
473
474     +------+------------------------+
475     | size |       data bytes       |
476     +------+------------------------+
477
478   The size is 4 bytes written most significant byte first, being the
479number of subsequent data bytes, or the twos complement negative of
480that when a negative integer is represented.  The data bytes are the
481absolute value of the integer, written most significant byte first.
482
483   The most significant data byte is always non-zero, so the output is
484the same on all systems, irrespective of limb size.
485
486   In GMP 1, leading zero bytes were written to pad the data bytes to a
487multiple of the limb size.  `mpz_inp_raw' will still accept this, for
488compatibility.
489
490   The use of "big endian" for both the size and data fields is
491deliberate, it makes the data easy to read in a hex dump of a file.
492Unfortunately it also means that the limb data must be reversed when
493reading or writing, so neither a big endian nor little endian system
494can just read and write `_mp_d'.
495
496
497File: gmp.info,  Node: C++ Interface Internals,  Prev: Raw Output Internals,  Up: Internals
498
499C++ Interface Internals
500=======================
501
502A system of expression templates is used to ensure something like
503`a=b+c' turns into a simple call to `mpz_add' etc.  For `mpf_class' and
504`mpfr_class' the scheme also ensures the precision of the final
505destination is used for any temporaries within a statement like
506`f=w*x+y*z'.  These are important features which a naive implementation
507cannot provide.
508
509   A simplified description of the scheme follows.  The true scheme is
510complicated by the fact that expressions have different return types.
511For detailed information, refer to the source code.
512
513   To perform an operation, say, addition, we first define a "function
514object" evaluating it,
515
516     struct __gmp_binary_plus
517     {
518       static void eval(mpf_t f, mpf_t g, mpf_t h) { mpf_add(f, g, h); }
519     };
520
521And an "additive expression" object,
522
523     __gmp_expr<__gmp_binary_expr<mpf_class, mpf_class, __gmp_binary_plus> >
524     operator+(const mpf_class &f, const mpf_class &g)
525     {
526       return __gmp_expr
527         <__gmp_binary_expr<mpf_class, mpf_class, __gmp_binary_plus> >(f, g);
528     }
529
530   The seemingly redundant `__gmp_expr<__gmp_binary_expr<...>>' is used
531to encapsulate any possible kind of expression into a single template
532type.  In fact even `mpf_class' etc are `typedef' specializations of
533`__gmp_expr'.
534
535   Next we define assignment of `__gmp_expr' to `mpf_class'.
536
537     template <class T>
538     mpf_class & mpf_class::operator=(const __gmp_expr<T> &expr)
539     {
540       expr.eval(this->get_mpf_t(), this->precision());
541       return *this;
542     }
543     
544     template <class Op>
545     void __gmp_expr<__gmp_binary_expr<mpf_class, mpf_class, Op> >::eval
546     (mpf_t f, unsigned long int precision)
547     {
548       Op::eval(f, expr.val1.get_mpf_t(), expr.val2.get_mpf_t());
549     }
550
551   where `expr.val1' and `expr.val2' are references to the expression's
552operands (here `expr' is the `__gmp_binary_expr' stored within the
553`__gmp_expr').
554
555   This way, the expression is actually evaluated only at the time of
556assignment, when the required precision (that of `f') is known.
557Furthermore the target `mpf_t' is now available, thus we can call
558`mpf_add' directly with `f' as the output argument.
559
560   Compound expressions are handled by defining operators taking
561subexpressions as their arguments, like this:
562
563     template <class T, class U>
564     __gmp_expr
565     <__gmp_binary_expr<__gmp_expr<T>, __gmp_expr<U>, __gmp_binary_plus> >
566     operator+(const __gmp_expr<T> &expr1, const __gmp_expr<U> &expr2)
567     {
568       return __gmp_expr
569         <__gmp_binary_expr<__gmp_expr<T>, __gmp_expr<U>, __gmp_binary_plus> >
570         (expr1, expr2);
571     }
572
573   And the corresponding specializations of `__gmp_expr::eval':
574
575     template <class T, class U, class Op>
576     void __gmp_expr
577     <__gmp_binary_expr<__gmp_expr<T>, __gmp_expr<U>, Op> >::eval
578     (mpf_t f, unsigned long int precision)
579     {
580       // declare two temporaries
581       mpf_class temp1(expr.val1, precision), temp2(expr.val2, precision);
582       Op::eval(f, temp1.get_mpf_t(), temp2.get_mpf_t());
583     }
584
585   The expression is thus recursively evaluated to any level of
586complexity and all subexpressions are evaluated to the precision of `f'.
587
588
589File: gmp.info,  Node: Contributors,  Next: References,  Prev: Internals,  Up: Top
590
591Contributors
592************
593
594Torbjorn Granlund wrote the original GMP library and is still
595developing and maintaining it.  Several other individuals and
596organizations have contributed to GMP in various ways.  Here is a list
597in chronological order:
598
599   Gunnar Sjoedin and Hans Riesel helped with mathematical problems in
600early versions of the library.
601
602   Richard Stallman contributed to the interface design and revised the
603first version of this manual.
604
605   Brian Beuning and Doug Lea helped with testing of early versions of
606the library and made creative suggestions.
607
608   John Amanatides of York University in Canada contributed the function
609`mpz_probab_prime_p'.
610
611   Paul Zimmermann of Inria sparked the development of GMP 2, with his
612comparisons between bignum packages.
613
614   Ken Weber (Kent State University, Universidade Federal do Rio Grande
615do Sul) contributed `mpz_gcd', `mpz_divexact', `mpn_gcd', and
616`mpn_bdivmod', partially supported by CNPq (Brazil) grant 301314194-2.
617
618   Per Bothner of Cygnus Support helped to set up GMP to use Cygnus'
619configure.  He has also made valuable suggestions and tested numerous
620intermediary releases.
621
622   Joachim Hollman was involved in the design of the `mpf' interface,
623and in the `mpz' design revisions for version 2.
624
625   Bennet Yee contributed the initial versions of `mpz_jacobi' and
626`mpz_legendre'.
627
628   Andreas Schwab contributed the files `mpn/m68k/lshift.S' and
629`mpn/m68k/rshift.S' (now in `.asm' form).
630
631   The development of floating point functions of GNU MP 2, were
632supported in part by the ESPRIT-BRA (Basic Research Activities) 6846
633project POSSO (POlynomial System SOlving).
634
635   GNU MP 2 was finished and released by SWOX AB, SWEDEN, in
636cooperation with the IDA Center for Computing Sciences, USA.
637
638   Robert Harley of Inria, France and David Seal of ARM, England,
639suggested clever improvements for population count.
640
641   Robert Harley also wrote highly optimized Karatsuba and 3-way Toom
642multiplication functions for GMP 3.  He also contributed the ARM
643assembly code.
644
645   Torsten Ekedahl of the Mathematical department of Stockholm
646University provided significant inspiration during several phases of
647the GMP development.  His mathematical expertise helped improve several
648algorithms.
649
650   Paul Zimmermann wrote the Divide and Conquer division code, the REDC
651code, the REDC-based mpz_powm code, the FFT multiply code, and the
652Karatsuba square root.  The ECMNET project Paul is organizing was a
653driving force behind many of the optimizations in GMP 3.
654
655   Linus Nordberg wrote the new configure system based on autoconf and
656implemented the new random functions.
657
658   Kent Boortz made the Macintosh port.
659
660   Kevin Ryde worked on a number of things: optimized x86 code, m4 asm
661macros, parameter tuning, speed measuring, the configure system,
662function inlining, divisibility tests, bit scanning, Jacobi symbols,
663Fibonacci and Lucas number functions, printf and scanf functions, perl
664interface, demo expression parser, the algorithms chapter in the
665manual, `gmpasm-mode.el', and various miscellaneous improvements
666elsewhere.
667
668   Steve Root helped write the optimized alpha 21264 assembly code.
669
670   Gerardo Ballabio wrote the `gmpxx.h' C++ class interface and the C++
671`istream' input routines.
672
673   GNU MP 4.0 was finished and released by Torbjorn Granlund and Kevin
674Ryde.  Torbjorn's work was partially funded by the IDA Center for
675Computing Sciences, USA.
676
677   (This list is chronological, not ordered after significance.  If you
678have contributed to GMP but are not listed above, please tell
679<tege@swox.com> about the omission!)
680
681   Thanks goes to Hans Thorsen for donating an SGI system for the GMP
682test system environment.
683
684
685File: gmp.info,  Node: References,  Next: GNU Free Documentation License,  Prev: Contributors,  Up: Top
686
687References
688**********
689
690Books
691=====
692
693   * Jonathan M. Borwein and Peter B. Borwein, "Pi and the AGM: A Study
694     in Analytic Number Theory and Computational Complexity", Wiley,
695     John & Sons, 1998.
696
697   * Henri Cohen, "A Course in Computational Algebraic Number Theory",
698     Graduate Texts in Mathematics number 138, Springer-Verlag, 1993.
699     `http://www.math.u-bordeaux.fr/~cohen'
700
701   * Donald E. Knuth, "The Art of Computer Programming", volume 2,
702     "Seminumerical Algorithms", 3rd edition, Addison-Wesley, 1998.
703     `http://www-cs-faculty.stanford.edu/~knuth/taocp.html'
704
705   * John D. Lipson, "Elements of Algebra and Algebraic Computing", The
706     Benjamin Cummings Publishing Company Inc, 1981.
707
708   * Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone,
709     "Handbook of Applied Cryptography",
710     `http://www.cacr.math.uwaterloo.ca/hac/'
711
712   * Richard M. Stallman, "Using and Porting GCC", Free Software
713     Foundation, 1999, available online
714     `http://www.gnu.org/software/gcc/onlinedocs/', and in the GCC
715     package `ftp://ftp.gnu.org/gnu/gcc/'
716
717Papers
718======
719
720   * Yves Bertot, Nicolas Magaud and Paul Zimmermann, "A Proof of GMP
721     Square Root", Journal of Automated Reasoning, volume 29, 2002, pp.
722     225-252.  Also available online as INRIA Research Report 4475,
723     June 2001, `http://www.inria.fr/rrrt/rr-4475.html'
724
725   * Christoph Burnikel and Joachim Ziegler, "Fast Recursive Division",
726     Max-Planck-Institut fuer Informatik Research Report
727     MPI-I-98-1-022,
728     `http://data.mpi-sb.mpg.de/internet/reports.nsf/NumberView/1998-1-022'
729
730   * Torbjorn Granlund and Peter L. Montgomery, "Division by Invariant
731     Integers using Multiplication", in Proceedings of the SIGPLAN
732     PLDI'94 Conference, June 1994.  Also available
733     `ftp://ftp.cwi.nl/pub/pmontgom/divcnst.psa4.gz' (and .psl.gz).
734
735   * Peter L. Montgomery, "Modular Multiplication Without Trial
736     Division", in Mathematics of Computation, volume 44, number 170,
737     April 1985.
738
739   * Tudor Jebelean, "An algorithm for exact division", Journal of
740     Symbolic Computation, volume 15, 1993, pp. 169-180.  Research
741     report version available
742     `ftp://ftp.risc.uni-linz.ac.at/pub/techreports/1992/92-35.ps.gz'
743
744   * Tudor Jebelean, "Exact Division with Karatsuba Complexity -
745     Extended Abstract", RISC-Linz technical report 96-31,
746     `ftp://ftp.risc.uni-linz.ac.at/pub/techreports/1996/96-31.ps.gz'
747
748   * Tudor Jebelean, "Practical Integer Division with Karatsuba
749     Complexity", ISSAC 97, pp. 339-341.  Technical report available
750     `ftp://ftp.risc.uni-linz.ac.at/pub/techreports/1996/96-29.ps.gz'
751
752   * Tudor Jebelean, "A Generalization of the Binary GCD Algorithm",
753     ISSAC 93, pp. 111-116.  Technical report version available
754     `ftp://ftp.risc.uni-linz.ac.at/pub/techreports/1993/93-01.ps.gz'
755
756   * Tudor Jebelean, "A Double-Digit Lehmer-Euclid Algorithm for
757     Finding the GCD of Long Integers", Journal of Symbolic
758     Computation, volume 19, 1995, pp. 145-157.  Technical report
759     version also available
760     `ftp://ftp.risc.uni-linz.ac.at/pub/techreports/1992/92-69.ps.gz'
761
762   * Werner Krandick and Tudor Jebelean, "Bidirectional Exact Integer
763     Division", Journal of Symbolic Computation, volume 21, 1996, pp.
764     441-455.  Early technical report version also available
765     `ftp://ftp.risc.uni-linz.ac.at/pub/techreports/1994/94-50.ps.gz'
766
767   * R. Moenck and A. Borodin, "Fast Modular Transforms via Division",
768     Proceedings of the 13th Annual IEEE Symposium on Switching and
769     Automata Theory, October 1972, pp. 90-96.  Reprinted as "Fast
770     Modular Transforms", Journal of Computer and System Sciences,
771     volume 8, number 3, June 1974, pp. 366-386.
772
773   * Arnold Scho"nhage and Volker Strassen, "Schnelle Multiplikation
774     grosser Zahlen", Computing 7, 1971, pp. 281-292.
775
776   * Kenneth Weber, "The accelerated integer GCD algorithm", ACM
777     Transactions on Mathematical Software, volume 21, number 1, March
778     1995, pp. 111-122.
779
780   * Paul Zimmermann, "Karatsuba Square Root", INRIA Research Report
781     3805, November 1999, `http://www.inria.fr/RRRT/RR-3805.html'
782
783   * Paul Zimmermann, "A Proof of GMP Fast Division and Square Root
784     Implementations",
785     `http://www.loria.fr/~zimmerma/papers/proof-div-sqrt.ps.gz'
786
787   * Dan Zuras, "On Squaring and Multiplying Large Integers", ARITH-11:
788     IEEE Symposium on Computer Arithmetic, 1993, pp. 260 to 271.
789     Reprinted as "More on Multiplying and Squaring Large Integers",
790     IEEE Transactions on Computers, volume 43, number 8, August 1994,
791     pp. 899-908.
792
793
794File: gmp.info,  Node: GNU Free Documentation License,  Next: Concept Index,  Prev: References,  Up: Top
795
796GNU Free Documentation License
797******************************
798
799                      Version 1.2, November 2002
800     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
801     59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
802     
803     Everyone is permitted to copy and distribute verbatim copies
804     of this license document, but changing it is not allowed.
805
806  0. PREAMBLE
807
808     The purpose of this License is to make a manual, textbook, or other
809     functional and useful document "free" in the sense of freedom: to
810     assure everyone the effective freedom to copy and redistribute it,
811     with or without modifying it, either commercially or
812     noncommercially.  Secondarily, this License preserves for the
813     author and publisher a way to get credit for their work, while not
814     being considered responsible for modifications made by others.
815
816     This License is a kind of "copyleft", which means that derivative
817     works of the document must themselves be free in the same sense.
818     It complements the GNU General Public License, which is a copyleft
819     license designed for free software.
820
821     We have designed this License in order to use it for manuals for
822     free software, because free software needs free documentation: a
823     free program should come with manuals providing the same freedoms
824     that the software does.  But this License is not limited to
825     software manuals; it can be used for any textual work, regardless
826     of subject matter or whether it is published as a printed book.
827     We recommend this License principally for works whose purpose is
828     instruction or reference.
829
830  1. APPLICABILITY AND DEFINITIONS
831
832     This License applies to any manual or other work, in any medium,
833     that contains a notice placed by the copyright holder saying it
834     can be distributed under the terms of this License.  Such a notice
835     grants a world-wide, royalty-free license, unlimited in duration,
836     to use that work under the conditions stated herein.  The
837     "Document", below, refers to any such manual or work.  Any member
838     of the public is a licensee, and is addressed as "you".  You
839     accept the license if you copy, modify or distribute the work in a
840     way requiring permission under copyright law.
841
842     A "Modified Version" of the Document means any work containing the
843     Document or a portion of it, either copied verbatim, or with
844     modifications and/or translated into another language.
845
846     A "Secondary Section" is a named appendix or a front-matter section
847     of the Document that deals exclusively with the relationship of the
848     publishers or authors of the Document to the Document's overall
849     subject (or to related matters) and contains nothing that could
850     fall directly within that overall subject.  (Thus, if the Document
851     is in part a textbook of mathematics, a Secondary Section may not
852     explain any mathematics.)  The relationship could be a matter of
853     historical connection with the subject or with related matters, or
854     of legal, commercial, philosophical, ethical or political position
855     regarding them.
856
857     The "Invariant Sections" are certain Secondary Sections whose
858     titles are designated, as being those of Invariant Sections, in
859     the notice that says that the Document is released under this
860     License.  If a section does not fit the above definition of
861     Secondary then it is not allowed to be designated as Invariant.
862     The Document may contain zero Invariant Sections.  If the Document
863     does not identify any Invariant Sections then there are none.
864
865     The "Cover Texts" are certain short passages of text that are
866     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
867     that says that the Document is released under this License.  A
868     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
869     be at most 25 words.
870
871     A "Transparent" copy of the Document means a machine-readable copy,
872     represented in a format whose specification is available to the
873     general public, that is suitable for revising the document
874     straightforwardly with generic text editors or (for images
875     composed of pixels) generic paint programs or (for drawings) some
876     widely available drawing editor, and that is suitable for input to
877     text formatters or for automatic translation to a variety of
878     formats suitable for input to text formatters.  A copy made in an
879     otherwise Transparent file format whose markup, or absence of
880     markup, has been arranged to thwart or discourage subsequent
881     modification by readers is not Transparent.  An image format is
882     not Transparent if used for any substantial amount of text.  A
883     copy that is not "Transparent" is called "Opaque".
884
885     Examples of suitable formats for Transparent copies include plain
886     ASCII without markup, Texinfo input format, LaTeX input format,
887     SGML or XML using a publicly available DTD, and
888     standard-conforming simple HTML, PostScript or PDF designed for
889     human modification.  Examples of transparent image formats include
890     PNG, XCF and JPG.  Opaque formats include proprietary formats that
891     can be read and edited only by proprietary word processors, SGML or
892     XML for which the DTD and/or processing tools are not generally
893     available, and the machine-generated HTML, PostScript or PDF
894     produced by some word processors for output purposes only.
895
896     The "Title Page" means, for a printed book, the title page itself,
897     plus such following pages as are needed to hold, legibly, the
898     material this License requires to appear in the title page.  For
899     works in formats which do not have any title page as such, "Title
900     Page" means the text near the most prominent appearance of the
901     work's title, preceding the beginning of the body of the text.
902
903     A section "Entitled XYZ" means a named subunit of the Document
904     whose title either is precisely XYZ or contains XYZ in parentheses
905     following text that translates XYZ in another language.  (Here XYZ
906     stands for a specific section name mentioned below, such as
907     "Acknowledgements", "Dedications", "Endorsements", or "History".)
908     To "Preserve the Title" of such a section when you modify the
909     Document means that it remains a section "Entitled XYZ" according
910     to this definition.
911
912     The Document may include Warranty Disclaimers next to the notice
913     which states that this License applies to the Document.  These
914     Warranty Disclaimers are considered to be included by reference in
915     this License, but only as regards disclaiming warranties: any other
916     implication that these Warranty Disclaimers may have is void and
917     has no effect on the meaning of this License.
918
919  2. VERBATIM COPYING
920
921     You may copy and distribute the Document in any medium, either
922     commercially or noncommercially, provided that this License, the
923     copyright notices, and the license notice saying this License
924     applies to the Document are reproduced in all copies, and that you
925     add no other conditions whatsoever to those of this License.  You
926     may not use technical measures to obstruct or control the reading
927     or further copying of the copies you make or distribute.  However,
928     you may accept compensation in exchange for copies.  If you
929     distribute a large enough number of copies you must also follow
930     the conditions in section 3.
931
932     You may also lend copies, under the same conditions stated above,
933     and you may publicly display copies.
934
935  3. COPYING IN QUANTITY
936
937     If you publish printed copies (or copies in media that commonly
938     have printed covers) of the Document, numbering more than 100, and
939     the Document's license notice requires Cover Texts, you must
940     enclose the copies in covers that carry, clearly and legibly, all
941     these Cover Texts: Front-Cover Texts on the front cover, and
942     Back-Cover Texts on the back cover.  Both covers must also clearly
943     and legibly identify you as the publisher of these copies.  The
944     front cover must present the full title with all words of the
945     title equally prominent and visible.  You may add other material
946     on the covers in addition.  Copying with changes limited to the
947     covers, as long as they preserve the title of the Document and
948     satisfy these conditions, can be treated as verbatim copying in
949     other respects.
950
951     If the required texts for either cover are too voluminous to fit
952     legibly, you should put the first ones listed (as many as fit
953     reasonably) on the actual cover, and continue the rest onto
954     adjacent pages.
955
956     If you publish or distribute Opaque copies of the Document
957     numbering more than 100, you must either include a
958     machine-readable Transparent copy along with each Opaque copy, or
959     state in or with each Opaque copy a computer-network location from
960     which the general network-using public has access to download
961     using public-standard network protocols a complete Transparent
962     copy of the Document, free of added material.  If you use the
963     latter option, you must take reasonably prudent steps, when you
964     begin distribution of Opaque copies in quantity, to ensure that
965     this Transparent copy will remain thus accessible at the stated
966     location until at least one year after the last time you
967     distribute an Opaque copy (directly or through your agents or
968     retailers) of that edition to the public.
969
970     It is requested, but not required, that you contact the authors of
971     the Document well before redistributing any large number of
972     copies, to give them a chance to provide you with an updated
973     version of the Document.
974
975  4. MODIFICATIONS
976
977     You may copy and distribute a Modified Version of the Document
978     under the conditions of sections 2 and 3 above, provided that you
979     release the Modified Version under precisely this License, with
980     the Modified Version filling the role of the Document, thus
981     licensing distribution and modification of the Modified Version to
982     whoever possesses a copy of it.  In addition, you must do these
983     things in the Modified Version:
984
985       A. Use in the Title Page (and on the covers, if any) a title
986          distinct from that of the Document, and from those of
987          previous versions (which should, if there were any, be listed
988          in the History section of the Document).  You may use the
989          same title as a previous version if the original publisher of
990          that version gives permission.
991
992       B. List on the Title Page, as authors, one or more persons or
993          entities responsible for authorship of the modifications in
994          the Modified Version, together with at least five of the
995          principal authors of the Document (all of its principal
996          authors, if it has fewer than five), unless they release you
997          from this requirement.
998
999       C. State on the Title page the name of the publisher of the
1000          Modified Version, as the publisher.
1001
1002       D. Preserve all the copyright notices of the Document.
1003
1004       E. Add an appropriate copyright notice for your modifications
1005          adjacent to the other copyright notices.
1006
1007       F. Include, immediately after the copyright notices, a license
1008          notice giving the public permission to use the Modified
1009          Version under the terms of this License, in the form shown in
1010          the Addendum below.
1011
1012       G. Preserve in that license notice the full lists of Invariant
1013          Sections and required Cover Texts given in the Document's
1014          license notice.
1015
1016       H. Include an unaltered copy of this License.
1017
1018       I. Preserve the section Entitled "History", Preserve its Title,
1019          and add to it an item stating at least the title, year, new
1020          authors, and publisher of the Modified Version as given on
1021          the Title Page.  If there is no section Entitled "History" in
1022          the Document, create one stating the title, year, authors,
1023          and publisher of the Document as given on its Title Page,
1024          then add an item describing the Modified Version as stated in
1025          the previous sentence.
1026
1027       J. Preserve the network location, if any, given in the Document
1028          for public access to a Transparent copy of the Document, and
1029          likewise the network locations given in the Document for
1030          previous versions it was based on.  These may be placed in
1031          the "History" section.  You may omit a network location for a
1032          work that was published at least four years before the
1033          Document itself, or if the original publisher of the version
1034          it refers to gives permission.
1035
1036       K. For any section Entitled "Acknowledgements" or "Dedications",
1037          Preserve the Title of the section, and preserve in the
1038          section all the substance and tone of each of the contributor
1039          acknowledgements and/or dedications given therein.
1040
1041       L. Preserve all the Invariant Sections of the Document,
1042          unaltered in their text and in their titles.  Section numbers
1043          or the equivalent are not considered part of the section
1044          titles.
1045
1046       M. Delete any section Entitled "Endorsements".  Such a section
1047          may not be included in the Modified Version.
1048
1049       N. Do not retitle any existing section to be Entitled
1050          "Endorsements" or to conflict in title with any Invariant
1051          Section.
1052
1053       O. Preserve any Warranty Disclaimers.
1054
1055     If the Modified Version includes new front-matter sections or
1056     appendices that qualify as Secondary Sections and contain no
1057     material copied from the Document, you may at your option
1058     designate some or all of these sections as invariant.  To do this,
1059     add their titles to the list of Invariant Sections in the Modified
1060     Version's license notice.  These titles must be distinct from any
1061     other section titles.
1062
1063     You may add a section Entitled "Endorsements", provided it contains
1064     nothing but endorsements of your Modified Version by various
1065     parties--for example, statements of peer review or that the text
1066     has been approved by an organization as the authoritative
1067     definition of a standard.
1068
1069     You may add a passage of up to five words as a Front-Cover Text,
1070     and a passage of up to 25 words as a Back-Cover Text, to the end
1071     of the list of Cover Texts in the Modified Version.  Only one
1072     passage of Front-Cover Text and one of Back-Cover Text may be
1073     added by (or through arrangements made by) any one entity.  If the
1074     Document already includes a cover text for the same cover,
1075     previously added by you or by arrangement made by the same entity
1076     you are acting on behalf of, you may not add another; but you may
1077     replace the old one, on explicit permission from the previous
1078     publisher that added the old one.
1079
1080     The author(s) and publisher(s) of the Document do not by this
1081     License give permission to use their names for publicity for or to
1082     assert or imply endorsement of any Modified Version.
1083
1084  5. COMBINING DOCUMENTS
1085
1086     You may combine the Document with other documents released under
1087     this License, under the terms defined in section 4 above for
1088     modified versions, provided that you include in the combination
1089     all of the Invariant Sections of all of the original documents,
1090     unmodified, and list them all as Invariant Sections of your
1091     combined work in its license notice, and that you preserve all
1092     their Warranty Disclaimers.
1093
1094     The combined work need only contain one copy of this License, and
1095     multiple identical Invariant Sections may be replaced with a single
1096     copy.  If there are multiple Invariant Sections with the same name
1097     but different contents, make the title of each such section unique
1098     by adding at the end of it, in parentheses, the name of the
1099     original author or publisher of that section if known, or else a
1100     unique number.  Make the same adjustment to the section titles in
1101     the list of Invariant Sections in the license notice of the
1102     combined work.
1103
1104     In the combination, you must combine any sections Entitled
1105     "History" in the various original documents, forming one section
1106     Entitled "History"; likewise combine any sections Entitled
1107     "Acknowledgements", and any sections Entitled "Dedications".  You
1108     must delete all sections Entitled "Endorsements."
1109
1110  6. COLLECTIONS OF DOCUMENTS
1111
1112     You may make a collection consisting of the Document and other
1113     documents released under this License, and replace the individual
1114     copies of this License in the various documents with a single copy
1115     that is included in the collection, provided that you follow the
1116     rules of this License for verbatim copying of each of the
1117     documents in all other respects.
1118
1119     You may extract a single document from such a collection, and
1120     distribute it individually under this License, provided you insert
1121     a copy of this License into the extracted document, and follow
1122     this License in all other respects regarding verbatim copying of
1123     that document.
1124
1125  7. AGGREGATION WITH INDEPENDENT WORKS
1126
1127     A compilation of the Document or its derivatives with other
1128     separate and independent documents or works, in or on a volume of
1129     a storage or distribution medium, is called an "aggregate" if the
1130     copyright resulting from the compilation is not used to limit the
1131     legal rights of the compilation's users beyond what the individual
1132     works permit.  When the Document is included in an aggregate, this
1133     License does not apply to the other works in the aggregate which
1134     are not themselves derivative works of the Document.
1135
1136     If the Cover Text requirement of section 3 is applicable to these
1137     copies of the Document, then if the Document is less than one half
1138     of the entire aggregate, the Document's Cover Texts may be placed
1139     on covers that bracket the Document within the aggregate, or the
1140     electronic equivalent of covers if the Document is in electronic
1141     form.  Otherwise they must appear on printed covers that bracket
1142     the whole aggregate.
1143
1144  8. TRANSLATION
1145
1146     Translation is considered a kind of modification, so you may
1147     distribute translations of the Document under the terms of section
1148     4.  Replacing Invariant Sections with translations requires special
1149     permission from their copyright holders, but you may include
1150     translations of some or all Invariant Sections in addition to the
1151     original versions of these Invariant Sections.  You may include a
1152     translation of this License, and all the license notices in the
1153     Document, and any Warranty Disclaimers, provided that you also
1154     include the original English version of this License and the
1155     original versions of those notices and disclaimers.  In case of a
1156     disagreement between the translation and the original version of
1157     this License or a notice or disclaimer, the original version will
1158     prevail.
1159
1160     If a section in the Document is Entitled "Acknowledgements",
1161     "Dedications", or "History", the requirement (section 4) to
1162     Preserve its Title (section 1) will typically require changing the
1163     actual title.
1164
1165  9. TERMINATION
1166
1167     You may not copy, modify, sublicense, or distribute the Document
1168     except as expressly provided for under this License.  Any other
1169     attempt to copy, modify, sublicense or distribute the Document is
1170     void, and will automatically terminate your rights under this
1171     License.  However, parties who have received copies, or rights,
1172     from you under this License will not have their licenses
1173     terminated so long as such parties remain in full compliance.
1174
1175 10. FUTURE REVISIONS OF THIS LICENSE
1176
1177     The Free Software Foundation may publish new, revised versions of
1178     the GNU Free Documentation License from time to time.  Such new
1179     versions will be similar in spirit to the present version, but may
1180     differ in detail to address new problems or concerns.  See
1181     `http://www.gnu.org/copyleft/'.
1182
1183     Each version of the License is given a distinguishing version
1184     number.  If the Document specifies that a particular numbered
1185     version of this License "or any later version" applies to it, you
1186     have the option of following the terms and conditions either of
1187     that specified version or of any later version that has been
1188     published (not as a draft) by the Free Software Foundation.  If
1189     the Document does not specify a version number of this License,
1190     you may choose any version ever published (not as a draft) by the
1191     Free Software Foundation.
1192
1193ADDENDUM: How to use this License for your documents
1194====================================================
1195
1196To use this License in a document you have written, include a copy of
1197the License in the document and put the following copyright and license
1198notices just after the title page:
1199
1200       Copyright (C)  YEAR  YOUR NAME.
1201       Permission is granted to copy, distribute and/or modify this document
1202       under the terms of the GNU Free Documentation License, Version 1.2
1203       or any later version published by the Free Software Foundation;
1204       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
1205       Texts.  A copy of the license is included in the section entitled ``GNU
1206       Free Documentation License''.
1207
1208   If you have Invariant Sections, Front-Cover Texts and Back-Cover
1209Texts, replace the "with...Texts." line with this:
1210
1211         with the Invariant Sections being LIST THEIR TITLES, with
1212         the Front-Cover Texts being LIST, and with the Back-Cover Texts
1213         being LIST.
1214
1215   If you have Invariant Sections without Cover Texts, or some other
1216combination of the three, merge those two alternatives to suit the
1217situation.
1218
1219   If your document contains nontrivial examples of program code, we
1220recommend releasing these examples in parallel under your choice of
1221free software license, such as the GNU General Public License, to
1222permit their use in free software.
1223
1224
1225File: gmp.info,  Node: Concept Index,  Next: Function Index,  Prev: GNU Free Documentation License,  Up: Top
1226
1227Concept Index
1228*************
1229
1230* Menu:
1231
1232* --exec-prefix:                         Build Options.
1233* --prefix:                              Build Options.
1234* 68000:                                 Known Build Problems.
1235* ABI:                                   ABI and ISA.
1236* About this manual:                     Introduction to GMP.
1237* Algorithms:                            Algorithms.
1238* alloca:                                Build Options.
1239* Allocation of memory:                  Custom Allocation.
1240* Anonymous FTP of latest version:       Introduction to GMP.
1241* Application Binary Interface:          ABI and ISA.
1242* Arithmetic functions <1>:              Float Arithmetic.
1243* Arithmetic functions <2>:              Rational Arithmetic.
1244* Arithmetic functions:                  Integer Arithmetic.
1245* Assignment functions <1>:              Assigning Floats.
1246* Assignment functions:                  Assigning Integers.
1247* Autoconf detections:                   Autoconf.
1248* Basics:                                GMP Basics.
1249* Berkeley MP compatible functions:      BSD Compatible Functions.
1250* Binomial coefficient functions:        Number Theoretic Functions.
1251* Bit manipulation functions:            Integer Logic and Bit Fiddling.
1252* Bit shift left:                        Integer Arithmetic.
1253* Bit shift right:                       Integer Division.
1254* Bits per limb:                         Useful Macros and Constants.
1255* BSD MP compatible functions:           BSD Compatible Functions.
1256* Bug reporting:                         Reporting Bugs.
1257* Build notes for binary packaging:      Notes for Package Builds.
1258* Build notes for particular systems:    Notes for Particular Systems.
1259* Build options:                         Build Options.
1260* Build problems known:                  Known Build Problems.
1261* Building GMP:                          Installing GMP.
1262* C++ Interface:                         C++ Class Interface.
1263* C++ istream input:                     C++ Formatted Input.
1264* C++ ostream output:                    C++ Formatted Output.
1265* Comparison functions <1>:              Integer Comparisons.
1266* Comparison functions <2>:              Float Comparison.
1267* Comparison functions:                  Comparing Rationals.
1268* Compatibility with older versions:     Compatibility with older versions.
1269* Conditions for copying GNU MP:         Copying.
1270* Configuring GMP:                       Installing GMP.
1271* Constants:                             Useful Macros and Constants.
1272* Contributors:                          Contributors.
1273* Conventions for parameters:            Parameter Conventions.
1274* Conventions for variables:             Variable Conventions.
1275* Conversion functions <1>:              Converting Integers.
1276* Conversion functions <2>:              Converting Floats.
1277* Conversion functions:                  Rational Conversions.
1278* Copying conditions:                    Copying.
1279* CPUs supported:                        Introduction to GMP.
1280* Custom allocation:                     Custom Allocation.
1281* Debugging:                             Debugging.
1282* Demonstration programs:                Demonstration Programs.
1283* DESTDIR:                               Known Build Problems.
1284* Digits in an integer:                  Miscellaneous Integer Functions.
1285* Division algorithms:                   Division Algorithms.
1286* Division functions <1>:                Integer Division.
1287* Division functions <2>:                Rational Arithmetic.
1288* Division functions:                    Float Arithmetic.
1289* Efficiency:                            Efficiency.
1290* Emacs:                                 Emacs.
1291* Exact division functions:              Integer Division.
1292* Example programs:                      Demonstration Programs.
1293* Exec prefix:                           Build Options.
1294* Exponentiation functions <1>:          Integer Exponentiation.
1295* Exponentiation functions:              Float Arithmetic.
1296* Export:                                Integer Import and Export.
1297* Extended GCD:                          Number Theoretic Functions.
1298* Factorial functions:                   Number Theoretic Functions.
1299* FDL, GNU Free Documentation License:   GNU Free Documentation License.
1300* Fibonacci sequence functions:          Number Theoretic Functions.
1301* Float arithmetic functions:            Float Arithmetic.
1302* Float assignment functions:            Assigning Floats.
1303* Float comparison functions:            Float Comparison.
1304* Float conversion functions:            Converting Floats.
1305* Float functions:                       Floating-point Functions.
1306* Float init and assign functions:       Simultaneous Float Init & Assign.
1307* Float initialization functions:        Initializing Floats.
1308* Float input and output functions:      I/O of Floats.
1309* Float miscellaneous functions:         Miscellaneous Float Functions.
1310* Float sign tests:                      Float Comparison.
1311* Floating point mode:                   Notes for Particular Systems.
1312* Floating-point functions:              Floating-point Functions.
1313* Floating-point number:                 Nomenclature and Types.
1314* Formatted input:                       Formatted Input.
1315* Formatted output:                      Formatted Output.
1316* FTP of latest version:                 Introduction to GMP.
1317* Function classes:                      Function Classes.
1318* GMP version number:                    Useful Macros and Constants.
1319* gmp.h:                                 Headers and Libraries.
1320* gmpxx.h:                               C++ Interface General.
1321* GNU Free Documentation License:        GNU Free Documentation License.
1322* Greatest common divisor algorithms:    Greatest Common Divisor Algorithms.
1323* Greatest common divisor functions:     Number Theoretic Functions.
1324* Hardware floating point mode:          Notes for Particular Systems.
1325* Headers:                               Headers and Libraries.
1326* Home page:                             Introduction to GMP.
1327* I/O functions <1>:                     I/O of Rationals.
1328* I/O functions <2>:                     I/O of Floats.
1329* I/O functions:                         I/O of Integers.
1330* Import:                                Integer Import and Export.
1331* Initialization and assignment functions <1>: Simultaneous Integer Init & Assign.
1332* Initialization and assignment functions <2>: Initializing Rationals.
1333* Initialization and assignment functions: Simultaneous Float Init & Assign.
1334* Initialization functions <1>:          Initializing Floats.
1335* Initialization functions:              Initializing Integers.
1336* Input functions <1>:                   I/O of Integers.
1337* Input functions <2>:                   I/O of Rationals.
1338* Input functions:                       I/O of Floats.
1339* Install prefix:                        Build Options.
1340* Installing GMP:                        Installing GMP.
1341* Instruction Set Architecture:          ABI and ISA.
1342* Integer:                               Nomenclature and Types.
1343* Integer arithmetic functions:          Integer Arithmetic.
1344* Integer assignment functions:          Assigning Integers.
1345* Integer bit manipulation functions:    Integer Logic and Bit Fiddling.
1346* Integer comparison functions:          Integer Comparisons.
1347* Integer conversion functions:          Converting Integers.
1348* Integer division functions:            Integer Division.
1349* Integer exponentiation functions:      Integer Exponentiation.
1350* Integer export:                        Integer Import and Export.
1351* Integer functions:                     Integer Functions.
1352* Integer import:                        Integer Import and Export.
1353* Integer init and assign:               Simultaneous Integer Init & Assign.
1354* Integer initialization functions:      Initializing Integers.
1355* Integer input and output functions:    I/O of Integers.
1356* Integer miscellaneous functions:       Miscellaneous Integer Functions.
1357* Integer random number functions:       Integer Random Numbers.
1358* Integer root functions:                Integer Roots.
1359* Integer sign tests:                    Integer Comparisons.
1360* Introduction:                          Introduction to GMP.
1361* ISA:                                   ABI and ISA.
1362* istream input:                         C++ Formatted Input.
1363* Jacobi symbol functions:               Number Theoretic Functions.
1364* Kronecker symbol functions:            Number Theoretic Functions.
1365* Latest version of GMP:                 Introduction to GMP.
1366* Least common multiple functions:       Number Theoretic Functions.
1367* Libraries:                             Headers and Libraries.
1368* Libtool versioning:                    Notes for Package Builds.
1369* License conditions:                    Copying.
1370* Limb:                                  Nomenclature and Types.
1371* Limb size:                             Useful Macros and Constants.
1372* Linking:                               Headers and Libraries.
1373* Logical functions:                     Integer Logic and Bit Fiddling.
1374* Low-level functions:                   Low-level Functions.
1375* Lucas number functions:                Number Theoretic Functions.
1376* Mailing lists:                         Introduction to GMP.
1377* Memory allocation:                     Custom Allocation.
1378* Memory Management:                     Memory Management.
1379* Miscellaneous float functions:         Miscellaneous Float Functions.
1380* Miscellaneous integer functions:       Miscellaneous Integer Functions.
1381* Modular inverse functions:             Number Theoretic Functions.
1382* Most significant bit:                  Miscellaneous Integer Functions.
1383* mp.h:                                  BSD Compatible Functions.
1384* MPFR:                                  Build Options.
1385* mpfrxx.h:                              C++ Interface MPFR.
1386* Multi-threading:                       Reentrancy.
1387* Multiplication algorithms:             Multiplication Algorithms.
1388* Nails:                                 Low-level Functions.
1389* Nomenclature:                          Nomenclature and Types.
1390* Number theoretic functions:            Number Theoretic Functions.
1391* Numerator and denominator:             Applying Integer Functions.
1392* ostream output:                        C++ Formatted Output.
1393* Output functions <1>:                  I/O of Integers.
1394* Output functions <2>:                  I/O of Floats.
1395* Output functions:                      I/O of Rationals.
1396* Packaged builds:                       Notes for Package Builds.
1397* PalmOS:                                Known Build Problems.
1398* Parameter conventions:                 Parameter Conventions.
1399* Particular systems:                    Notes for Particular Systems.
1400* perl:                                  Demonstration Programs.
1401* Powering algorithms:                   Powering Algorithms.
1402* Powering functions <1>:                Integer Exponentiation.
1403* Powering functions:                    Float Arithmetic.
1404* Precision of floats:                   Floating-point Functions.
1405* Precision of hardware floating point:  Notes for Particular Systems.
1406* Prefix:                                Build Options.
1407* Prime testing functions:               Number Theoretic Functions.
1408* printf formatted output:               Formatted Output.
1409* Profiling:                             Profiling.
1410* Radix conversion algorithms:           Radix Conversion Algorithms.
1411* Random number functions <1>:           Integer Random Numbers.
1412* Random number functions:               Random Number Functions.
1413* Random number seeding:                 Random State Seeding.
1414* Random number state:                   Random State Initialization.
1415* Rational arithmetic functions:         Rational Arithmetic.
1416* Rational comparison functions:         Comparing Rationals.
1417* Rational conversion functions:         Rational Conversions.
1418* Rational init and assign:              Initializing Rationals.
1419* Rational input and output functions:   I/O of Rationals.
1420* Rational number:                       Nomenclature and Types.
1421* Rational number functions:             Rational Number Functions.
1422* Rational numerator and denominator:    Applying Integer Functions.
1423* Rational sign tests:                   Comparing Rationals.
1424* Reentrancy:                            Reentrancy.
1425* References:                            References.
1426* Reporting bugs:                        Reporting Bugs.
1427* Root extraction algorithms:            Root Extraction Algorithms.
1428* Root extraction functions <1>:         Float Arithmetic.
1429* Root extraction functions:             Integer Roots.
1430* Sample programs:                       Demonstration Programs.
1431* scanf formatted input:                 Formatted Input.
1432* Shared library versioning:             Notes for Package Builds.
1433* Sign tests <1>:                        Comparing Rationals.
1434* Sign tests <2>:                        Float Comparison.
1435* Sign tests:                            Integer Comparisons.
1436* Size in digits:                        Miscellaneous Integer Functions.
1437* Sparc:                                 Notes for Particular Systems.
1438* Stack overflow segfaults:              Build Options.
1439* Stripped libraries:                    Known Build Problems.
1440* Systems:                               Notes for Particular Systems.
1441* Thread safety:                         Reentrancy.
1442* Types:                                 Nomenclature and Types.
1443* Upward compatibility:                  Compatibility with older versions.
1444* Useful macros and constants:           Useful Macros and Constants.
1445* User-defined precision:                Floating-point Functions.
1446* Valgrind:                              Debugging.
1447* Variable conventions:                  Variable Conventions.
1448* Version number:                        Useful Macros and Constants.
1449* Web page:                              Introduction to GMP.
1450* x87:                                   Notes for Particular Systems.
1451
1452
1453File: gmp.info,  Node: Function Index,  Prev: Concept Index,  Up: Top
1454
1455Function and Type Index
1456***********************
1457
1458* Menu:
1459
1460* __GNU_MP_VERSION:                      Useful Macros and Constants.
1461* __GNU_MP_VERSION_MINOR:                Useful Macros and Constants.
1462* __GNU_MP_VERSION_PATCHLEVEL:           Useful Macros and Constants.
1463* _mpz_realloc:                          Initializing Integers.
1464* abs <1>:                               C++ Interface Integers.
1465* abs <2>:                               C++ Interface Floats.
1466* abs:                                   C++ Interface Rationals.
1467* allocate_function:                     Custom Allocation.
1468* ceil:                                  C++ Interface Floats.
1469* cmp <1>:                               C++ Interface Floats.
1470* cmp <2>:                               C++ Interface Integers.
1471* cmp <3>:                               C++ Interface Rationals.
1472* cmp <4>:                               C++ Interface Floats.
1473* cmp:                                   C++ Interface Rationals.
1474* deallocate_function:                   Custom Allocation.
1475* floor:                                 C++ Interface Floats.
1476* gcd:                                   BSD Compatible Functions.
1477* gmp_asprintf:                          Formatted Output Functions.
1478* gmp_errno:                             Random State Initialization.
1479* GMP_ERROR_INVALID_ARGUMENT:            Random State Initialization.
1480* GMP_ERROR_UNSUPPORTED_ARGUMENT:        Random State Initialization.
1481* gmp_fprintf:                           Formatted Output Functions.
1482* gmp_fscanf:                            Formatted Input Functions.
1483* GMP_LIMB_BITS:                         Low-level Functions.
1484* GMP_NAIL_BITS:                         Low-level Functions.
1485* GMP_NAIL_MASK:                         Low-level Functions.
1486* GMP_NUMB_BITS:                         Low-level Functions.
1487* GMP_NUMB_MASK:                         Low-level Functions.
1488* GMP_NUMB_MAX:                          Low-level Functions.
1489* gmp_obstack_printf:                    Formatted Output Functions.
1490* gmp_obstack_vprintf:                   Formatted Output Functions.
1491* gmp_printf:                            Formatted Output Functions.
1492* GMP_RAND_ALG_DEFAULT:                  Random State Initialization.
1493* GMP_RAND_ALG_LC:                       Random State Initialization.
1494* gmp_randclass:                         C++ Interface Random Numbers.
1495* gmp_randclass::get_f:                  C++ Interface Random Numbers.
1496* gmp_randclass::get_z_bits:             C++ Interface Random Numbers.
1497* gmp_randclass::get_z_range:            C++ Interface Random Numbers.
1498* gmp_randclass::gmp_randclass:          C++ Interface Random Numbers.
1499* gmp_randclass::seed:                   C++ Interface Random Numbers.
1500* gmp_randclear:                         Random State Initialization.
1501* gmp_randinit:                          Random State Initialization.
1502* gmp_randinit_default:                  Random State Initialization.
1503* gmp_randinit_lc_2exp:                  Random State Initialization.
1504* gmp_randinit_lc_2exp_size:             Random State Initialization.
1505* gmp_randseed:                          Random State Seeding.
1506* gmp_randseed_ui:                       Random State Seeding.
1507* gmp_scanf:                             Formatted Input Functions.
1508* gmp_snprintf:                          Formatted Output Functions.
1509* gmp_sprintf:                           Formatted Output Functions.
1510* gmp_sscanf:                            Formatted Input Functions.
1511* gmp_vasprintf:                         Formatted Output Functions.
1512* gmp_version:                           Useful Macros and Constants.
1513* gmp_vfprintf:                          Formatted Output Functions.
1514* gmp_vfscanf:                           Formatted Input Functions.
1515* gmp_vprintf:                           Formatted Output Functions.
1516* gmp_vscanf:                            Formatted Input Functions.
1517* gmp_vsnprintf:                         Formatted Output Functions.
1518* gmp_vsprintf:                          Formatted Output Functions.
1519* gmp_vsscanf:                           Formatted Input Functions.
1520* hypot:                                 C++ Interface Floats.
1521* itom:                                  BSD Compatible Functions.
1522* madd:                                  BSD Compatible Functions.
1523* mcmp:                                  BSD Compatible Functions.
1524* mdiv:                                  BSD Compatible Functions.
1525* mfree:                                 BSD Compatible Functions.
1526* min:                                   BSD Compatible Functions.
1527* mout:                                  BSD Compatible Functions.
1528* move:                                  BSD Compatible Functions.
1529* mp_bits_per_limb:                      Useful Macros and Constants.
1530* mp_limb_t:                             Nomenclature and Types.
1531* mp_set_memory_functions:               Custom Allocation.
1532* mpf_abs:                               Float Arithmetic.
1533* mpf_add:                               Float Arithmetic.
1534* mpf_add_ui:                            Float Arithmetic.
1535* mpf_ceil:                              Miscellaneous Float Functions.
1536* mpf_class:                             C++ Interface General.
1537* mpf_class::fits_sint_p:                C++ Interface Floats.
1538* mpf_class::fits_slong_p:               C++ Interface Floats.
1539* mpf_class::fits_sshort_p:              C++ Interface Floats.
1540* mpf_class::fits_uint_p:                C++ Interface Floats.
1541* mpf_class::fits_ulong_p:               C++ Interface Floats.
1542* mpf_class::fits_ushort_p:              C++ Interface Floats.
1543* mpf_class::get_d:                      C++ Interface Floats.
1544* mpf_class::get_mpf_t:                  C++ Interface General.
1545* mpf_class::get_prec:                   C++ Interface Floats.
1546* mpf_class::get_si:                     C++ Interface Floats.
1547* mpf_class::get_ui:                     C++ Interface Floats.
1548* mpf_class::mpf_class:                  C++ Interface Floats.
1549* mpf_class::operator=:                  C++ Interface Floats.
1550* mpf_class::set_prec:                   C++ Interface Floats.
1551* mpf_class::set_prec_raw:               C++ Interface Floats.
1552* mpf_clear:                             Initializing Floats.
1553* mpf_cmp:                               Float Comparison.
1554* mpf_cmp_d:                             Float Comparison.
1555* mpf_cmp_si:                            Float Comparison.
1556* mpf_cmp_ui:                            Float Comparison.
1557* mpf_div:                               Float Arithmetic.
1558* mpf_div_2exp:                          Float Arithmetic.
1559* mpf_div_ui:                            Float Arithmetic.
1560* mpf_eq:                                Float Comparison.
1561* mpf_fits_sint_p:                       Miscellaneous Float Functions.
1562* mpf_fits_slong_p:                      Miscellaneous Float Functions.
1563* mpf_fits_sshort_p:                     Miscellaneous Float Functions.
1564* mpf_fits_uint_p:                       Miscellaneous Float Functions.
1565* mpf_fits_ulong_p:                      Miscellaneous Float Functions.
1566* mpf_fits_ushort_p:                     Miscellaneous Float Functions.
1567* mpf_floor:                             Miscellaneous Float Functions.
1568* mpf_get_d:                             Converting Floats.
1569* mpf_get_d_2exp:                        Converting Floats.
1570* mpf_get_default_prec:                  Initializing Floats.
1571* mpf_get_prec:                          Initializing Floats.
1572* mpf_get_si:                            Converting Floats.
1573* mpf_get_str:                           Converting Floats.
1574* mpf_get_ui:                            Converting Floats.
1575* mpf_init:                              Initializing Floats.
1576* mpf_init2:                             Initializing Floats.
1577* mpf_init_set:                          Simultaneous Float Init & Assign.
1578* mpf_init_set_d:                        Simultaneous Float Init & Assign.
1579* mpf_init_set_si:                       Simultaneous Float Init & Assign.
1580* mpf_init_set_str:                      Simultaneous Float Init & Assign.
1581* mpf_init_set_ui:                       Simultaneous Float Init & Assign.
1582* mpf_inp_str:                           I/O of Floats.
1583* mpf_integer_p:                         Miscellaneous Float Functions.
1584* mpf_mul:                               Float Arithmetic.
1585* mpf_mul_2exp:                          Float Arithmetic.
1586* mpf_mul_ui:                            Float Arithmetic.
1587* mpf_neg:                               Float Arithmetic.
1588* mpf_out_str:                           I/O of Floats.
1589* mpf_pow_ui:                            Float Arithmetic.
1590* mpf_random2:                           Miscellaneous Float Functions.
1591* mpf_reldiff:                           Float Comparison.
1592* mpf_set:                               Assigning Floats.
1593* mpf_set_d:                             Assigning Floats.
1594* mpf_set_default_prec:                  Initializing Floats.
1595* mpf_set_prec:                          Initializing Floats.
1596* mpf_set_prec_raw:                      Initializing Floats.
1597* mpf_set_q:                             Assigning Floats.
1598* mpf_set_si:                            Assigning Floats.
1599* mpf_set_str:                           Assigning Floats.
1600* mpf_set_ui:                            Assigning Floats.
1601* mpf_set_z:                             Assigning Floats.
1602* mpf_sgn:                               Float Comparison.
1603* mpf_sqrt:                              Float Arithmetic.
1604* mpf_sqrt_ui:                           Float Arithmetic.
1605* mpf_sub:                               Float Arithmetic.
1606* mpf_sub_ui:                            Float Arithmetic.
1607* mpf_swap:                              Assigning Floats.
1608* mpf_t:                                 Nomenclature and Types.
1609* mpf_trunc:                             Miscellaneous Float Functions.
1610* mpf_ui_div:                            Float Arithmetic.
1611* mpf_ui_sub:                            Float Arithmetic.
1612* mpf_urandomb:                          Miscellaneous Float Functions.
1613* mpfr_class:                            C++ Interface MPFR.
1614* mpn_add:                               Low-level Functions.
1615* mpn_add_1:                             Low-level Functions.
1616* mpn_add_n:                             Low-level Functions.
1617* mpn_addmul_1:                          Low-level Functions.
1618* mpn_bdivmod:                           Low-level Functions.
1619* mpn_cmp:                               Low-level Functions.
1620* mpn_divexact_by3:                      Low-level Functions.
1621* mpn_divexact_by3c:                     Low-level Functions.
1622* mpn_divmod:                            Low-level Functions.
1623* mpn_divmod_1:                          Low-level Functions.
1624* mpn_divrem:                            Low-level Functions.
1625* mpn_divrem_1:                          Low-level Functions.
1626* mpn_gcd:                               Low-level Functions.
1627* mpn_gcd_1:                             Low-level Functions.
1628* mpn_gcdext:                            Low-level Functions.
1629* mpn_get_str:                           Low-level Functions.
1630* mpn_hamdist:                           Low-level Functions.
1631* mpn_lshift:                            Low-level Functions.
1632* mpn_mod_1:                             Low-level Functions.
1633* mpn_mul:                               Low-level Functions.
1634* mpn_mul_1:                             Low-level Functions.
1635* mpn_mul_n:                             Low-level Functions.
1636* mpn_perfect_square_p:                  Low-level Functions.
1637* mpn_popcount:                          Low-level Functions.
1638* mpn_random:                            Low-level Functions.
1639* mpn_random2:                           Low-level Functions.
1640* mpn_rshift:                            Low-level Functions.
1641* mpn_scan0:                             Low-level Functions.
1642* mpn_scan1:                             Low-level Functions.
1643* mpn_set_str:                           Low-level Functions.
1644* mpn_sqrtrem:                           Low-level Functions.
1645* mpn_sub:                               Low-level Functions.
1646* mpn_sub_1:                             Low-level Functions.
1647* mpn_sub_n:                             Low-level Functions.
1648* mpn_submul_1:                          Low-level Functions.
1649* mpn_tdiv_qr:                           Low-level Functions.
1650* mpq_abs:                               Rational Arithmetic.
1651* mpq_add:                               Rational Arithmetic.
1652* mpq_canonicalize:                      Rational Number Functions.
1653* mpq_class:                             C++ Interface General.
1654* mpq_class::canonicalize:               C++ Interface Rationals.
1655* mpq_class::get_d:                      C++ Interface Rationals.
1656* mpq_class::get_den:                    C++ Interface Rationals.
1657* mpq_class::get_den_mpz_t:              C++ Interface Rationals.
1658* mpq_class::get_mpq_t:                  C++ Interface General.
1659* mpq_class::get_num:                    C++ Interface Rationals.
1660* mpq_class::get_num_mpz_t:              C++ Interface Rationals.
1661* mpq_class::mpq_class:                  C++ Interface Rationals.
1662* mpq_clear:                             Initializing Rationals.
1663* mpq_cmp:                               Comparing Rationals.
1664* mpq_cmp_si:                            Comparing Rationals.
1665* mpq_cmp_ui:                            Comparing Rationals.
1666* mpq_denref:                            Applying Integer Functions.
1667* mpq_div:                               Rational Arithmetic.
1668* mpq_div_2exp:                          Rational Arithmetic.
1669* mpq_equal:                             Comparing Rationals.
1670* mpq_get_d:                             Rational Conversions.
1671* mpq_get_den:                           Applying Integer Functions.
1672* mpq_get_num:                           Applying Integer Functions.
1673* mpq_get_str:                           Rational Conversions.
1674* mpq_init:                              Initializing Rationals.
1675* mpq_inp_str:                           I/O of Rationals.
1676* mpq_inv:                               Rational Arithmetic.
1677* mpq_mul:                               Rational Arithmetic.
1678* mpq_mul_2exp:                          Rational Arithmetic.
1679* mpq_neg:                               Rational Arithmetic.
1680* mpq_numref:                            Applying Integer Functions.
1681* mpq_out_str:                           I/O of Rationals.
1682* mpq_set:                               Initializing Rationals.
1683* mpq_set_d:                             Rational Conversions.
1684* mpq_set_den:                           Applying Integer Functions.
1685* mpq_set_f:                             Rational Conversions.
1686* mpq_set_num:                           Applying Integer Functions.
1687* mpq_set_si:                            Initializing Rationals.
1688* mpq_set_str:                           Initializing Rationals.
1689* mpq_set_ui:                            Initializing Rationals.
1690* mpq_set_z:                             Initializing Rationals.
1691* mpq_sgn:                               Comparing Rationals.
1692* mpq_sub:                               Rational Arithmetic.
1693* mpq_swap:                              Initializing Rationals.
1694* mpq_t:                                 Nomenclature and Types.
1695* mpz_abs:                               Integer Arithmetic.
1696* mpz_add:                               Integer Arithmetic.
1697* mpz_add_ui:                            Integer Arithmetic.
1698* mpz_addmul:                            Integer Arithmetic.
1699* mpz_addmul_ui:                         Integer Arithmetic.
1700* mpz_and:                               Integer Logic and Bit Fiddling.
1701* mpz_array_init:                        Initializing Integers.
1702* mpz_bin_ui:                            Number Theoretic Functions.
1703* mpz_bin_uiui:                          Number Theoretic Functions.
1704* mpz_cdiv_q:                            Integer Division.
1705* mpz_cdiv_q_2exp:                       Integer Division.
1706* mpz_cdiv_q_ui:                         Integer Division.
1707* mpz_cdiv_qr:                           Integer Division.
1708* mpz_cdiv_qr_ui:                        Integer Division.
1709* mpz_cdiv_r:                            Integer Division.
1710* mpz_cdiv_r_2exp:                       Integer Division.
1711* mpz_cdiv_r_ui:                         Integer Division.
1712* mpz_cdiv_ui:                           Integer Division.
1713* mpz_class:                             C++ Interface General.
1714* mpz_class::fits_sint_p:                C++ Interface Integers.
1715* mpz_class::fits_slong_p:               C++ Interface Integers.
1716* mpz_class::fits_sshort_p:              C++ Interface Integers.
1717* mpz_class::fits_uint_p:                C++ Interface Integers.
1718* mpz_class::fits_ulong_p:               C++ Interface Integers.
1719* mpz_class::fits_ushort_p:              C++ Interface Integers.
1720* mpz_class::get_d:                      C++ Interface Integers.
1721* mpz_class::get_mpz_t:                  C++ Interface General.
1722* mpz_class::get_si:                     C++ Interface Integers.
1723* mpz_class::get_ui:                     C++ Interface Integers.
1724* mpz_class::mpz_class:                  C++ Interface Integers.
1725* mpz_clear:                             Initializing Integers.
1726* mpz_clrbit:                            Integer Logic and Bit Fiddling.
1727* mpz_cmp:                               Integer Comparisons.
1728* mpz_cmp_d:                             Integer Comparisons.
1729* mpz_cmp_si:                            Integer Comparisons.
1730* mpz_cmp_ui:                            Integer Comparisons.
1731* mpz_cmpabs:                            Integer Comparisons.
1732* mpz_cmpabs_d:                          Integer Comparisons.
1733* mpz_cmpabs_ui:                         Integer Comparisons.
1734* mpz_com:                               Integer Logic and Bit Fiddling.
1735* mpz_congruent_2exp_p:                  Integer Division.
1736* mpz_congruent_p:                       Integer Division.
1737* mpz_congruent_ui_p:                    Integer Division.
1738* mpz_divexact:                          Integer Division.
1739* mpz_divexact_ui:                       Integer Division.
1740* mpz_divisible_2exp_p:                  Integer Division.
1741* mpz_divisible_p:                       Integer Division.
1742* mpz_divisible_ui_p:                    Integer Division.
1743* mpz_even_p:                            Miscellaneous Integer Functions.
1744* mpz_export:                            Integer Import and Export.
1745* mpz_fac_ui:                            Number Theoretic Functions.
1746* mpz_fdiv_q:                            Integer Division.
1747* mpz_fdiv_q_2exp:                       Integer Division.
1748* mpz_fdiv_q_ui:                         Integer Division.
1749* mpz_fdiv_qr:                           Integer Division.
1750* mpz_fdiv_qr_ui:                        Integer Division.
1751* mpz_fdiv_r:                            Integer Division.
1752* mpz_fdiv_r_2exp:                       Integer Division.
1753* mpz_fdiv_r_ui:                         Integer Division.
1754* mpz_fdiv_ui:                           Integer Division.
1755* mpz_fib2_ui:                           Number Theoretic Functions.
1756* mpz_fib_ui:                            Number Theoretic Functions.
1757* mpz_fits_sint_p:                       Miscellaneous Integer Functions.
1758* mpz_fits_slong_p:                      Miscellaneous Integer Functions.
1759* mpz_fits_sshort_p:                     Miscellaneous Integer Functions.
1760* mpz_fits_uint_p:                       Miscellaneous Integer Functions.
1761* mpz_fits_ulong_p:                      Miscellaneous Integer Functions.
1762* mpz_fits_ushort_p:                     Miscellaneous Integer Functions.
1763* mpz_gcd:                               Number Theoretic Functions.
1764* mpz_gcd_ui:                            Number Theoretic Functions.
1765* mpz_gcdext:                            Number Theoretic Functions.
1766* mpz_get_d:                             Converting Integers.
1767* mpz_get_d_2exp:                        Converting Integers.
1768* mpz_get_si:                            Converting Integers.
1769* mpz_get_str:                           Converting Integers.
1770* mpz_get_ui:                            Converting Integers.
1771* mpz_getlimbn:                          Converting Integers.
1772* mpz_hamdist:                           Integer Logic and Bit Fiddling.
1773* mpz_import:                            Integer Import and Export.
1774* mpz_init:                              Initializing Integers.
1775* mpz_init2:                             Initializing Integers.
1776* mpz_init_set:                          Simultaneous Integer Init & Assign.
1777* mpz_init_set_d:                        Simultaneous Integer Init & Assign.
1778* mpz_init_set_si:                       Simultaneous Integer Init & Assign.
1779* mpz_init_set_str:                      Simultaneous Integer Init & Assign.
1780* mpz_init_set_ui:                       Simultaneous Integer Init & Assign.
1781* mpz_inp_raw:                           I/O of Integers.
1782* mpz_inp_str:                           I/O of Integers.
1783* mpz_invert:                            Number Theoretic Functions.
1784* mpz_ior:                               Integer Logic and Bit Fiddling.
1785* mpz_jacobi:                            Number Theoretic Functions.
1786* mpz_kronecker:                         Number Theoretic Functions.
1787* mpz_kronecker_si:                      Number Theoretic Functions.
1788* mpz_kronecker_ui:                      Number Theoretic Functions.
1789* mpz_lcm:                               Number Theoretic Functions.
1790* mpz_lcm_ui:                            Number Theoretic Functions.
1791* mpz_legendre:                          Number Theoretic Functions.
1792* mpz_lucnum2_ui:                        Number Theoretic Functions.
1793* mpz_lucnum_ui:                         Number Theoretic Functions.
1794* mpz_mod:                               Integer Division.
1795* mpz_mod_ui:                            Integer Division.
1796* mpz_mul:                               Integer Arithmetic.
1797* mpz_mul_2exp:                          Integer Arithmetic.
1798* mpz_mul_si:                            Integer Arithmetic.
1799* mpz_mul_ui:                            Integer Arithmetic.
1800* mpz_neg:                               Integer Arithmetic.
1801* mpz_nextprime:                         Number Theoretic Functions.
1802* mpz_odd_p:                             Miscellaneous Integer Functions.
1803* mpz_out_raw:                           I/O of Integers.
1804* mpz_out_str:                           I/O of Integers.
1805* mpz_perfect_power_p:                   Integer Roots.
1806* mpz_perfect_square_p:                  Integer Roots.
1807* mpz_popcount:                          Integer Logic and Bit Fiddling.
1808* mpz_pow_ui:                            Integer Exponentiation.
1809* mpz_powm:                              Integer Exponentiation.
1810* mpz_powm_ui:                           Integer Exponentiation.
1811* mpz_probab_prime_p:                    Number Theoretic Functions.
1812* mpz_random:                            Integer Random Numbers.
1813* mpz_random2:                           Integer Random Numbers.
1814* mpz_realloc2:                          Initializing Integers.
1815* mpz_remove:                            Number Theoretic Functions.
1816* mpz_root:                              Integer Roots.
1817* mpz_rrandomb:                          Integer Random Numbers.
1818* mpz_scan0:                             Integer Logic and Bit Fiddling.
1819* mpz_scan1:                             Integer Logic and Bit Fiddling.
1820* mpz_set:                               Assigning Integers.
1821* mpz_set_d:                             Assigning Integers.
1822* mpz_set_f:                             Assigning Integers.
1823* mpz_set_q:                             Assigning Integers.
1824* mpz_set_si:                            Assigning Integers.
1825* mpz_set_str:                           Assigning Integers.
1826* mpz_set_ui:                            Assigning Integers.
1827* mpz_setbit:                            Integer Logic and Bit Fiddling.
1828* mpz_sgn:                               Integer Comparisons.
1829* mpz_si_kronecker:                      Number Theoretic Functions.
1830* mpz_size:                              Miscellaneous Integer Functions.
1831* mpz_sizeinbase:                        Miscellaneous Integer Functions.
1832* mpz_sqrt:                              Integer Roots.
1833* mpz_sqrtrem:                           Integer Roots.
1834* mpz_sub:                               Integer Arithmetic.
1835* mpz_sub_ui:                            Integer Arithmetic.
1836* mpz_submul:                            Integer Arithmetic.
1837* mpz_submul_ui:                         Integer Arithmetic.
1838* mpz_swap:                              Assigning Integers.
1839* mpz_t:                                 Nomenclature and Types.
1840* mpz_tdiv_q:                            Integer Division.
1841* mpz_tdiv_q_2exp:                       Integer Division.
1842* mpz_tdiv_q_ui:                         Integer Division.
1843* mpz_tdiv_qr:                           Integer Division.
1844* mpz_tdiv_qr_ui:                        Integer Division.
1845* mpz_tdiv_r:                            Integer Division.
1846* mpz_tdiv_r_2exp:                       Integer Division.
1847* mpz_tdiv_r_ui:                         Integer Division.
1848* mpz_tdiv_ui:                           Integer Division.
1849* mpz_tstbit:                            Integer Logic and Bit Fiddling.
1850* mpz_ui_kronecker:                      Number Theoretic Functions.
1851* mpz_ui_pow_ui:                         Integer Exponentiation.
1852* mpz_ui_sub:                            Integer Arithmetic.
1853* mpz_urandomb:                          Integer Random Numbers.
1854* mpz_urandomm:                          Integer Random Numbers.
1855* mpz_xor:                               Integer Logic and Bit Fiddling.
1856* msqrt:                                 BSD Compatible Functions.
1857* msub:                                  BSD Compatible Functions.
1858* mtox:                                  BSD Compatible Functions.
1859* mult:                                  BSD Compatible Functions.
1860* operator%:                             C++ Interface Integers.
1861* operator/:                             C++ Interface Integers.
1862* operator<<:                            C++ Formatted Output.
1863* operator>> <1>:                        C++ Formatted Input.
1864* operator>>:                            C++ Interface Rationals.
1865* pow:                                   BSD Compatible Functions.
1866* reallocate_function:                   Custom Allocation.
1867* rpow:                                  BSD Compatible Functions.
1868* sdiv:                                  BSD Compatible Functions.
1869* sgn <1>:                               C++ Interface Rationals.
1870* sgn <2>:                               C++ Interface Floats.
1871* sgn:                                   C++ Interface Integers.
1872* sqrt <1>:                              C++ Interface Integers.
1873* sqrt:                                  C++ Interface Floats.
1874* trunc:                                 C++ Interface Floats.
1875* xtom:                                  BSD Compatible Functions.
1876
1877
Note: See TracBrowser for help on using the repository browser.