mpc.info revision 1.1.1.2
1This is mpc.info, produced by makeinfo version 5.2 from mpc.texi.
2
3This manual is for GNU MPC, a library for multiple precision complex
4arithmetic, version 1.0.3 of February 2015.
5
6   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
72011, 2012 INRIA
8
9     Permission is granted to copy, distribute and/or modify this
10     document under the terms of the GNU Free Documentation License,
11     Version 1.3 or any later version published by the Free Software
12     Foundation; with no Invariant Sections.  A copy of the license is
13     included in the section entitled "GNU Free Documentation License."
14INFO-DIR-SECTION GNU Packages
15START-INFO-DIR-ENTRY
16* mpc: (mpc)Multiple Precision Complex Library.
17END-INFO-DIR-ENTRY
18
19
20File: mpc.info,  Node: Top,  Next: Copying,  Up: (dir)
21
22GNU MPC
23*******
24
25This manual documents how to install and use the GNU Multiple Precision
26Complex Library, version 1.0.3
27
28* Menu:
29
30* Copying::                     GNU MPC Copying Conditions (LGPL).
31* Introduction to GNU MPC::         Brief introduction to GNU MPC.
32* Installing GNU MPC::              How to configure and compile the GNU MPC library.
33* Reporting Bugs::              How to usefully report bugs.
34* GNU MPC Basics::                  What every GNU MPC user should know.
35* Complex Functions::           Functions for arithmetic on complex numbers.
36* References::
37* Concept Index::
38* Function Index::
39* GNU Free Documentation License::
40
41
42File: mpc.info,  Node: Copying,  Next: Introduction to GNU MPC,  Prev: Top,  Up: Top
43
44GNU MPC Copying Conditions
45**************************
46
47GNU MPC is free software; you can redistribute it and/or modify it under
48the terms of the GNU Lesser General Public License as published by the
49Free Software Foundation; either version 3 of the License, or (at your
50option) any later version.
51
52   GNU MPC is distributed in the hope that it will be useful, but
53WITHOUT ANY WARRANTY; without even the implied warranty of
54MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
55General Public License for more details.
56
57   You should have received a copy of the GNU Lesser General Public
58License along with this program.  If not, see
59<http://www.gnu.org/licenses/>.
60
61
62File: mpc.info,  Node: Introduction to GNU MPC,  Next: Installing GNU MPC,  Prev: Copying,  Up: Top
63
641 Introduction to GNU MPC
65*************************
66
67GNU MPC is a portable library written in C for arbitrary precision
68arithmetic on complex numbers providing correct rounding.  It implements
69a multiprecision equivalent of the C99 standard.  It builds upon the GNU
70MP and the GNU MPFR libraries.
71
721.1 How to use this Manual
73==========================
74
75Everyone should read *note GNU MPC Basics::.  If you need to install the
76library yourself, you need to read *note Installing GNU MPC::, too.
77
78   The remainder of the manual can be used for later reference, although
79it is probably a good idea to skim through it.
80
81
82File: mpc.info,  Node: Installing GNU MPC,  Next: Reporting Bugs,  Prev: Introduction to GNU MPC,  Up: Top
83
842 Installing GNU MPC
85********************
86
87To build GNU MPC, you first have to install GNU MP (version 4.3.2 or
88higher) and GNU MPFR (version 2.4.2 or higher) on your computer.  You
89need a C compiler; GCC version 4.4 or higher is recommended, since GNU
90MPC may trigger a bug in previous versions, see the thread at
91<http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-February/000823.html>.
92And you need a standard Unix 'make' program, plus some other standard
93Unix utility programs.
94
95   Here are the steps needed to install the library on Unix systems:
96
97  1. 'tar xzf mpc-1.0.3.tar.gz'
98
99  2. 'cd mpc-1.0.3'
100
101  3. './configure'
102
103     if GMP and GNU MPFR are installed into standard directories, that
104     is, directories that are searched by default by the compiler and
105     the linking tools.
106
107     './configure --with-gmp=<gmp_install_dir>'
108
109     is used to indicate a different location where GMP is installed.
110     Alternatively, you can specify directly GMP include and GMP lib
111     directories with './configure --with-gmp-lib=<gmp_lib_dir>
112     --with-gmp-include=<gmp_include_dir>'.
113
114     './configure --with-mpfr=<mpfr_install_dir>'
115
116     is used to indicate a different location where GNU MPFR is
117     installed.  Alternatively, you can specify directly GNU MPFR
118     include and GNU MPFR lib directories with './configure
119     --with-mpf-lib=<mpfr_lib_dir>
120     --with-mpfr-include=<mpfr_include_dir>'.
121
122     Another useful parameter is '--prefix', which can be used to
123     specify an alternative installation location instead of
124     '/usr/local'; see 'make install' below.
125
126     To enable checking for memory leaks using 'valgrind' during 'make
127     check', add the parameter '--enable-valgrind-tests'.
128
129     If for debugging purposes you wish to log calls to GNU MPC
130     functions from within your code, add the parameter
131     '--enable-logging'.  In your code, replace the inclusion of 'mpc.h'
132     by 'mpc-log.h' and link the executable dynamically.  Then all calls
133     to functions with only complex arguments are printed to 'stderr' in
134     the following form: First, the function name is given, followed by
135     its type such as 'c_cc', meaning that the function has one complex
136     result (one 'c' in front of the '_'), computed from two complex
137     arguments (two 'c' after the '_').  Then, the precisions of the
138     real and the imaginary part of the first result is given, followed
139     by the second one and so on.  Finally, for each argument, the
140     precisions of its real and imaginary part are specified and the
141     argument itself is printed in hexadecimal via the function
142     'mpc_out_str' (*note String and Stream Input and Output::).  The
143     option requires a dynamic library, so it may not be combined with
144     '--disable-shared'.
145
146     Use './configure --help' for an exhaustive list of parameters.
147
148  4. 'make'
149
150     This compiles GNU MPC in the working directory.
151
152  5. 'make check'
153
154     This will make sure GNU MPC was built correctly.
155
156     If you get error messages, please report them to
157     'mpc-discuss@lists.gforge.inria.fr' (*Note Reporting Bugs::, for
158     information on what to include in useful bug reports).
159
160  6. 'make install'
161
162     This will copy the file 'mpc.h' to the directory
163     '/usr/local/include', the file 'libmpc.a' to the directory
164     '/usr/local/lib', and the file 'mpc.info' to the directory
165     '/usr/local/share/info' (or if you passed the '--prefix' option to
166     'configure', using the prefix directory given as argument to
167     '--prefix' instead of '/usr/local').  Note: you need write
168     permissions on these directories.
169
1702.1 Other 'make' Targets
171========================
172
173There are some other useful make targets:
174
175   * 'info'
176
177     Create an info version of the manual, in 'mpc.info'.
178
179   * 'pdf'
180
181     Create a PDF version of the manual, in 'doc/mpc.pdf'.
182
183   * 'dvi'
184
185     Create a DVI version of the manual, in 'doc/mpc.dvi'.
186
187   * 'ps'
188
189     Create a Postscript version of the manual, in 'doc/mpc.ps'.
190
191   * 'html'
192
193     Create an HTML version of the manual, in several pages in the
194     directory 'doc/mpc.html'; if you want only one output HTML file,
195     then type 'makeinfo --html --no-split mpc.texi' instead.
196
197   * 'clean'
198
199     Delete all object files and archive files, but not the
200     configuration files.
201
202   * 'distclean'
203
204     Delete all files not included in the distribution.
205
206   * 'uninstall'
207
208     Delete all files copied by 'make install'.
209
2102.2 Known Build Problems
211========================
212
213On AIX, if GMP was built with the 64-bit ABI, before building and
214testing GNU MPC, it might be necessary to set the 'OBJECT_MODE'
215environment variable to 64 by, e.g.,
216
217   'export OBJECT_MODE=64'
218
219   This has been tested with the C compiler IBM XL C/C++ Enterprise
220Edition V8.0 for AIX, version: 08.00.0000.0021, GMP 4.2.4 and GNU MPFR
2212.4.1.
222
223   Please report any other problems you encounter to
224'mpc-discuss@lists.gforge.inria.fr'.  *Note Reporting Bugs::.
225
226
227File: mpc.info,  Node: Reporting Bugs,  Next: GNU MPC Basics,  Prev: Installing GNU MPC,  Up: Top
228
2293 Reporting Bugs
230****************
231
232If you think you have found a bug in the GNU MPC library, please
233investigate and report it.  We have made this library available to you,
234and it is not to ask too much from you, to ask you to report the bugs
235that you find.
236
237   There are a few things you should think about when you put your bug
238report together.
239
240   You have to send us a test case that makes it possible for us to
241reproduce the bug.  Include instructions on how to run the test case.
242
243   You also have to explain what is wrong; if you get a crash, or if the
244results printed are incorrect and in that case, in what way.
245
246   Please include compiler version information in your bug report.  This
247can be extracted using 'gcc -v', or 'cc -V' on some machines.  Also,
248include the output from 'uname -a'.
249
250   If your bug report is good, we will do our best to help you to get a
251corrected version of the library; if the bug report is poor, we will not
252do anything about it (aside of chiding you to send better bug reports).
253
254   Send your bug report to: 'mpc-discuss@lists.gforge.inria.fr'.
255
256   If you think something in this manual is unclear, or downright
257incorrect, or if the language needs to be improved, please send a note
258to the same address.
259
260
261File: mpc.info,  Node: GNU MPC Basics,  Next: Complex Functions,  Prev: Reporting Bugs,  Up: Top
262
2634 GNU MPC Basics
264****************
265
266All declarations needed to use GNU MPC are collected in the include file
267'mpc.h'.  It is designed to work with both C and C++ compilers.  You
268should include that file in any program using the GNU MPC library by
269adding the line
270        #include "mpc.h"
271
2724.1 Nomenclature and Types
273==========================
274
275"Complex number" or "Complex" for short, is a pair of two arbitrary
276precision floating-point numbers (for the real and imaginary parts).
277The C data type for such objects is 'mpc_t'.
278
279The "Precision" is the number of bits used to represent the mantissa of
280the real and imaginary parts; the corresponding C data type is
281'mpfr_prec_t'.  For more details on the allowed precision range, *note
282(mpfr.info)Nomenclature and Types::.
283
284The "rounding mode" specifies the way to round the result of a complex
285operation, in case the exact result can not be represented exactly in
286the destination mantissa; the corresponding C data type is 'mpc_rnd_t'.
287A complex rounding mode is a pair of two rounding modes: one for the
288real part, one for the imaginary part.
289
2904.2 Function Classes
291====================
292
293There is only one class of functions in the GNU MPC library, namely
294functions for complex arithmetic.  The function names begin with 'mpc_'.
295The associated type is 'mpc_t'.
296
2974.3 GNU MPC Variable Conventions
298================================
299
300As a general rule, all GNU MPC functions expect output arguments before
301input arguments.  This notation is based on an analogy with the
302assignment operator.
303
304   GNU MPC allows you to use the same variable for both input and output
305in the same expression.  For example, the main function for
306floating-point multiplication, 'mpc_mul', can be used like this:
307'mpc_mul (x, x, x, rnd_mode)'.  This computes the square of X with
308rounding mode 'rnd_mode' and puts the result back in X.
309
310   Before you can assign to an GNU MPC variable, you need to initialize
311it by calling one of the special initialization functions.  When you are
312done with a variable, you need to clear it out, using one of the
313functions for that purpose.
314
315   A variable should only be initialized once, or at least cleared out
316between each initialization.  After a variable has been initialized, it
317may be assigned to any number of times.
318
319   For efficiency reasons, avoid to initialize and clear out a variable
320in loops.  Instead, initialize it before entering the loop, and clear it
321out after the loop has exited.
322
323   You do not need to be concerned about allocating additional space for
324GNU MPC variables, since each of its real and imaginary part has a
325mantissa of fixed size.  Hence unless you change its precision, or clear
326and reinitialize it, a complex variable will have the same allocated
327space during all its life.
328
3294.4 Rounding Modes
330==================
331
332A complex rounding mode is of the form 'MPC_RNDxy' where 'x' and 'y' are
333one of 'N' (to nearest), 'Z' (towards zero), 'U' (towards plus
334infinity), 'D' (towards minus infinity).  The first letter refers to the
335rounding mode for the real part, and the second one for the imaginary
336part.  For example 'MPC_RNDZU' indicates to round the real part towards
337zero, and the imaginary part towards plus infinity.
338
339   The 'round to nearest' mode works as in the IEEE P754 standard: in
340case the number to be rounded lies exactly in the middle of two
341representable numbers, it is rounded to the one with the least
342significant bit set to zero.  For example, the number 5, which is
343represented by (101) in binary, is rounded to (100)=4 with a precision
344of two bits, and not to (110)=6.
345
3464.5 Return Value
347================
348
349Most GNU MPC functions have a return value of type 'int', which is used
350to indicate the position of the rounded real and imaginary parts with
351respect to the exact (infinite precision) values.  If this integer is
352'i', the macros 'MPC_INEX_RE(i)' and 'MPC_INEX_IM(i)' give 0 if the
353corresponding rounded value is exact, a negative value if the rounded
354value is less than the exact one, and a positive value if it is greater
355than the exact one.  Similarly, functions computing a result of type
356'mpfr_t' return an integer that is 0, positive or negative depending on
357whether the rounded value is the same, larger or smaller then the exact
358result.
359
360   Some functions, such as 'mpc_sin_cos', compute two complex results;
361the macros 'MPC_INEX1(i)' and 'MPC_INEX2(i)', applied to the return
362value 'i' of such a function, yield the exactness value corresponding to
363the first or the second computed value, respectively.
364
3654.6 Branch Cuts And Special Values
366==================================
367
368Some complex functions have branch cuts, across which the function is
369discontinous.  In GNU MPC, the branch cuts chosen are the same as those
370specified for the corresponding functions in the ISO C99 standard.
371
372   Likewise, when evaluated at a point whose real or imaginary part is
373either infinite or a NaN or a signed zero, a function returns the same
374value as those specified for the corresponding function in the ISO C99
375standard.
376
377
378File: mpc.info,  Node: Complex Functions,  Next: References,  Prev: GNU MPC Basics,  Up: Top
379
3805 Complex Functions
381*******************
382
383The complex functions expect arguments of type 'mpc_t'.
384
385   The GNU MPC floating-point functions have an interface that is
386similar to the GNU MP integer functions.  The function prefix for
387operations on complex numbers is 'mpc_'.
388
389   The precision of a computation is defined as follows: Compute the
390requested operation exactly (with "infinite precision"), and round the
391result to the destination variable precision with the given rounding
392mode.
393
394   The GNU MPC complex functions are intended to be a smooth extension
395of the IEEE P754 arithmetic.  The results obtained on one computer
396should not differ from the results obtained on a computer with a
397different word size.
398
399* Menu:
400
401* Initializing Complex Numbers::
402* Assigning Complex Numbers::
403* Converting Complex Numbers::
404* String and Stream Input and Output::
405* Complex Comparison::
406* Projection & Decomposing::
407* Basic Arithmetic::
408* Power Functions and Logarithm::
409* Trigonometric Functions::
410* Miscellaneous Complex Functions::
411* Advanced Functions::
412* Internals::
413
414
415File: mpc.info,  Node: Initializing Complex Numbers,  Next: Assigning Complex Numbers,  Up: Complex Functions
416
4175.1 Initialization Functions
418============================
419
420An 'mpc_t' object must be initialized before storing the first value in
421it.  The functions 'mpc_init2' and 'mpc_init3' are used for that
422purpose.
423
424 -- Function: void mpc_init2 (mpc_t Z, mpfr_prec_t PREC)
425     Initialize Z to precision PREC bits and set its real and imaginary
426     parts to NaN. Normally, a variable should be initialized once only
427     or at least be cleared, using 'mpc_clear', between initializations.
428
429 -- Function: void mpc_init3 (mpc_t Z, mpfr_prec_t PREC_R, mpfr_prec_t
430          PREC_I)
431     Initialize Z with the precision of its real part being PREC_R bits
432     and the precision of its imaginary part being PREC_I bits, and set
433     the real and imaginary parts to NaN.
434
435 -- Function: void mpc_clear (mpc_t Z)
436     Free the space occupied by Z.  Make sure to call this function for
437     all 'mpc_t' variables when you are done with them.
438
439   Here is an example on how to initialize complex variables:
440     {
441       mpc_t x, y;
442       mpc_init2 (x, 256);		/* precision _exactly_ 256 bits */
443       mpc_init3 (y, 100, 50);	/* 100/50 bits for the real/imaginary part */
444       ...
445       mpc_clear (x);
446       mpc_clear (y);
447     }
448
449   The following function is useful for changing the precision during a
450calculation.  A typical use would be for adjusting the precision
451gradually in iterative algorithms like Newton-Raphson, making the
452computation precision closely match the actual accurate part of the
453numbers.
454
455 -- Function: void mpc_set_prec (mpc_t X, mpfr_prec_t PREC)
456     Reset the precision of X to be *exactly* PREC bits, and set its
457     real/imaginary parts to NaN. The previous value stored in X is
458     lost.  It is equivalent to a call to 'mpc_clear(x)' followed by a
459     call to 'mpc_init2(x, prec)', but more efficient as no allocation
460     is done in case the current allocated space for the mantissa of X
461     is sufficient.
462
463 -- Function: mpfr_prec_t mpc_get_prec (mpc_t X)
464     If the real and imaginary part of X have the same precision, it is
465     returned, otherwise, 0 is returned.
466
467 -- Function: void mpc_get_prec2 (mpfr_prec_t* PR, mpfr_prec_t* PI,
468          mpc_t X)
469     Returns the precision of the real part of X via PR and of its
470     imaginary part via PI.
471
472
473File: mpc.info,  Node: Assigning Complex Numbers,  Next: Converting Complex Numbers,  Prev: Initializing Complex Numbers,  Up: Complex Functions
474
4755.2 Assignment Functions
476========================
477
478These functions assign new values to already initialized complex numbers
479(*note Initializing Complex Numbers::).  When using any functions with
480'intmax_t' or 'uintmax_t' parameters, you must include '<stdint.h>' or
481'<inttypes.h>' _before_ 'mpc.h', to allow 'mpc.h' to define prototypes
482for these functions.  Similarly, functions with parameters of type
483'complex' or 'long complex' are defined only if '<complex.h>' is
484included _before_ 'mpc.h'.  If you need assignment functions that are
485not in the current API, you can define them using the 'MPC_SET_X_Y'
486macro (*note Advanced Functions::).
487
488 -- Function: int mpc_set (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
489     Set the value of ROP from OP, rounded to the precision of ROP with
490     the given rounding mode RND.
491
492 -- Function: int mpc_set_ui (mpc_t ROP, unsigned long int OP, mpc_rnd_t
493          RND)
494 -- Function: int mpc_set_si (mpc_t ROP, long int OP, mpc_rnd_t RND)
495 -- Function: int mpc_set_uj (mpc_t ROP, uintmax_t OP, mpc_rnd_t RND)
496 -- Function: int mpc_set_sj (mpc_t ROP, intmax_t OP, mpc_rnd_t RND)
497 -- Function: int mpc_set_d (mpc_t ROP, double OP, mpc_rnd_t RND)
498 -- Function: int mpc_set_ld (mpc_t ROP, long double OP, mpc_rnd_t RND)
499 -- Function: int mpc_set_dc (mpc_t ROP, double _Complex OP, mpc_rnd_t
500          RND)
501 -- Function: int mpc_set_ldc (mpc_t ROP, long double _Complex OP,
502          mpc_rnd_t RND)
503 -- Function: int mpc_set_z (mpc_t ROP, mpz_t OP mpc_rnd_t RND)
504 -- Function: int mpc_set_q (mpc_t ROP, mpq_t OP mpc_rnd_t RND)
505 -- Function: int mpc_set_f (mpc_t ROP, mpf_t OP mpc_rnd_t RND)
506 -- Function: int mpc_set_fr (mpc_t ROP, mpfr_t OP, mpc_rnd_t RND)
507     Set the value of ROP from OP, rounded to the precision of ROP with
508     the given rounding mode RND.  The argument OP is interpreted as
509     real, so the imaginary part of ROP is set to zero with a positive
510     sign.  Please note that even a 'long int' may have to be rounded,
511     if the destination precision is less than the machine word width.
512     For 'mpc_set_d', be careful that the input number OP may not be
513     exactly representable as a double-precision number (this happens
514     for 0.1 for instance), in which case it is first rounded by the C
515     compiler to a double-precision number, and then only to a complex
516     number.
517
518 -- Function: int mpc_set_ui_ui (mpc_t ROP, unsigned long int OP1,
519          unsigned long int OP2, mpc_rnd_t RND)
520 -- Function: int mpc_set_si_si (mpc_t ROP, long int OP1, long int OP2,
521          mpc_rnd_t RND)
522 -- Function: int mpc_set_uj_uj (mpc_t ROP, uintmax_t OP1, uintmax_t
523          OP2, mpc_rnd_t RND)
524 -- Function: int mpc_set_sj_sj (mpc_t ROP, intmax_t OP1, intmax_t OP2,
525          mpc_rnd_t RND)
526 -- Function: int mpc_set_d_d (mpc_t ROP, double OP1, double OP2,
527          mpc_rnd_t RND)
528 -- Function: int mpc_set_ld_ld (mpc_t ROP, long double OP1, long double
529          OP2, mpc_rnd_t RND)
530 -- Function: int mpc_set_z_z (mpc_t ROP, mpz_t OP1, mpz_t OP2,
531          mpc_rnd_t RND)
532 -- Function: int mpc_set_q_q (mpc_t ROP, mpq_t OP1, mpq_t OP2,
533          mpc_rnd_t RND)
534 -- Function: int mpc_set_f_f (mpc_t ROP, mpf_t OP1, mpf_t OP2,
535          mpc_rnd_t RND)
536 -- Function: int mpc_set_fr_fr (mpc_t ROP, mpfr_t OP1, mpfr_t OP2,
537          mpc_rnd_t RND)
538     Set the real part of ROP from OP1, and its imaginary part from OP2,
539     according to the rounding mode RND.
540
541     Beware that the behaviour of 'mpc_set_fr_fr' is undefined if OP1 or
542     OP2 is a pointer to the real or imaginary part of ROP.  To exchange
543     the real and the imaginary part of a complex number, either use
544     'mpfr_swap (mpc_realref (rop), mpc_imagref (rop))', which also
545     exchanges the precisions of the two parts; or use a temporary
546     variable.
547
548   For functions assigning complex variables from strings or input
549streams, *note String and Stream Input and Output::.
550
551 -- Function: void mpc_set_nan (mpc_t ROP)
552     Set ROP to Nan+i*NaN.
553
554 -- Function: void mpc_swap (mpc_t OP1, mpc_t OP2)
555     Swap the values of OP1 and OP2 efficiently.  Warning: The
556     precisions are exchanged, too; in case these are different,
557     'mpc_swap' is thus not equivalent to three 'mpc_set' calls using a
558     third auxiliary variable.
559
560
561File: mpc.info,  Node: Converting Complex Numbers,  Next: String and Stream Input and Output,  Prev: Assigning Complex Numbers,  Up: Complex Functions
562
5635.3 Conversion Functions
564========================
565
566The following functions are available only if '<complex.h>' is included
567_before_ 'mpc.h'.
568
569 -- Function: double _Complex mpc_get_dc (mpc_t OP, mpc_rnd_t RND)
570 -- Function: long double _Complex mpc_get_ldc (mpc_t OP, mpc_rnd_t RND)
571     Convert OP to a C complex number, using the rounding mode RND.
572
573   For functions converting complex variables to strings or stream
574output, *note String and Stream Input and Output::.
575
576
577File: mpc.info,  Node: String and Stream Input and Output,  Next: Complex Comparison,  Prev: Converting Complex Numbers,  Up: Complex Functions
578
5795.4 String and Stream Input and Output
580======================================
581
582 -- Function: int mpc_strtoc (mpc_t ROP, const char *NPTR, char
583          **ENDPTR, int BASE, mpc_rnd_t RND)
584     Read a complex number from a string NPTR in base BASE, rounded to
585     the precision of ROP with the given rounding mode RND.  The BASE
586     must be either 0 or a number from 2 to 36 (otherwise the behaviour
587     is undefined).  If NPTR starts with valid data, the result is
588     stored in ROP, the usual inexact value is returned (*note Return
589     Value: return-value.) and, if ENDPTR is not the null pointer,
590     *ENDPTR points to the character just after the valid data.
591     Otherwise, ROP is set to 'NaN + i * NaN', -1 is returned and, if
592     ENDPTR is not the null pointer, the value of NPTR is stored in the
593     location referenced by ENDPTR.
594
595     The expected form of a complex number string is either a real
596     number (an optional leading whitespace, an optional sign followed
597     by a floating-point number), or a pair of real numbers in
598     parentheses separated by whitespace.  If a real number is read, the
599     missing imaginary part is set to +0.  The form of a floating-point
600     number depends on the base and is described in the documentation of
601     'mpfr_strtofr' (*note (mpfr.info)Assignment Functions::).  For
602     instance, '"3.1415926"', '"(1.25e+7 +.17)"', '"(@nan@ 2)"' and
603     '"(-0 -7)"' are valid strings for BASE = 10.  If BASE = 0, then a
604     prefix may be used to indicate the base in which the floating-point
605     number is written.  Use prefix '0b' for binary numbers, prefix '0x'
606     for hexadecimal numbers, and no prefix for decimal numbers.  The
607     real and imaginary part may then be written in different bases.
608     For instance, '"(1.024e+3 +2.05e+3)"' and '"(0b1p+10 +0x802)"' are
609     valid strings for 'base'=0 and represent the same value.
610
611 -- Function: int mpc_set_str (mpc_t ROP, const char *S, int BASE,
612          mpc_rnd_t rnd)
613     Set ROP to the value of the string S in base BASE, rounded to the
614     precision of ROP with the given rounding mode RND.  See the
615     documentation of 'mpc_strtoc' for a detailed description of the
616     valid string formats.  Contrarily to 'mpc_strtoc', 'mpc_set_str'
617     requires the _whole_ string to represent a valid complex number
618     (potentially followed by additional white space).  This function
619     returns the usual inexact value (*note Return Value: return-value.)
620     if the entire string up to the final null character is a valid
621     number in base BASE; otherwise it returns -1, and ROP is set to
622     NaN+i*NaN.
623
624 -- Function: char * mpc_get_str (int B, size_t N, mpc_t OP, mpc_rnd_t
625          RND)
626     Convert OP to a string containing its real and imaginary parts,
627     separated by a space and enclosed in a pair of parentheses.  The
628     numbers are written in base B (which may vary from 2 to 36) and
629     rounded according to RND.  The number of significant digits, at
630     least 2, is given by N.  It is also possible to let N be zero, in
631     which case the number of digits is chosen large enough so that
632     re-reading the printed value with the same precision, assuming both
633     output and input use rounding to nearest, will recover the original
634     value of OP.  Note that 'mpc_get_str' uses the decimal point of the
635     current locale if available, and '.' otherwise.
636
637     The string is generated using the current memory allocation
638     function ('malloc' by default, unless it has been modified using
639     the custom memory allocation interface of 'gmp'); once it is not
640     needed any more, it should be freed by calling 'mpc_free_str'.
641
642 -- Function: void mpc_free_str (char *STR)
643     Free the string STR, which needs to have been allocated by a call
644     to 'mpc_get_str'.
645
646   The following two functions read numbers from input streams and write
647them to output streams.  When using any of these functions, you need to
648include 'stdio.h' _before_ 'mpc.h'.
649
650 -- Function: int mpc_inp_str (mpc_t ROP, FILE *STREAM, size_t *READ,
651          int BASE, mpc_rnd_t RND)
652     Input a string in base BASE in the same format as for 'mpc_strtoc'
653     from stdio stream STREAM, rounded according to RND, and put the
654     read complex number into ROP.  If STREAM is the null pointer, ROP
655     is read from 'stdin'.  Return the usual inexact value; if an error
656     occurs, set ROP to 'NaN + i * NaN' and return -1.  If READ is not
657     the null pointer, it is set to the number of read characters.
658
659     Unlike 'mpc_strtoc', the function 'mpc_inp_str' does not possess
660     perfect knowledge of the string to transform and has to read it
661     character by character, so it behaves slightly differently: It
662     tries to read a string describing a complex number and processes
663     this string through a call to 'mpc_set_str'.  Precisely, after
664     skipping optional whitespace, a minimal string is read according to
665     the regular expression 'mpfr | '(' \s* mpfr \s+ mpfr \s* ')'',
666     where '\s' denotes a whitespace, and 'mpfr' is either a string
667     containing neither whitespaces nor parentheses, or
668     'nan(n-char-sequence)' or '@nan@(n-char-sequence)' (regardless of
669     capitalisation) with 'n-char-sequence' a string of ascii letters,
670     digits or ''_''.
671
672     For instance, upon input of '"nan(13 1)"', the function
673     'mpc_inp_str' starts to recognise a value of NaN followed by an
674     n-char-sequence indicated by the opening parenthesis; as soon as
675     the space is reached, it becocmes clear that the expression in
676     parentheses is not an n-char-sequence, and the error flag -1 is
677     returned after 6 characters have been consumed from the stream (the
678     whitespace itself remaining in the stream).  The function
679     'mpc_strtoc', on the other hand, may track back when reaching the
680     whitespace; it treats the string as the two successive complex
681     numbers 'NaN + i * 0' and '13 + i'.  It is thus recommended to have
682     a whitespace follow each floating point number to avoid this
683     problem.
684
685 -- Function: size_t mpc_out_str (FILE *STREAM, int BASE, size_t
686          N_DIGITS, mpc_t OP, mpc_rnd_t RND)
687     Output OP on stdio stream STREAM in base BASE, rounded according to
688     RND, in the same format as for 'mpc_strtoc' If STREAM is the null
689     pointer, ROP is written to 'stdout'.
690
691     Return the number of characters written.
692
693
694File: mpc.info,  Node: Complex Comparison,  Next: Projection & Decomposing,  Prev: String and Stream Input and Output,  Up: Complex Functions
695
6965.5 Comparison Functions
697========================
698
699 -- Function: int mpc_cmp (mpc_t OP1, mpc_t OP2)
700 -- Function: int mpc_cmp_si_si (mpc_t OP1, long int OP2R, long int
701          OP2I)
702 -- Macro: int mpc_cmp_si (mpc_t OP1, long int OP2)
703
704     Compare OP1 and OP2, where in the case of 'mpc_cmp_si_si', OP2 is
705     taken to be OP2R + i OP2I.  The return value C can be decomposed
706     into 'x = MPC_INEX_RE(c)' and 'y = MPC_INEX_IM(c)', such that X is
707     positive if the real part of OP1 is greater than that of OP2, zero
708     if both real parts are equal, and negative if the real part of OP1
709     is less than that of OP2, and likewise for Y.  Both OP1 and OP2 are
710     considered to their full own precision, which may differ.  It is
711     not allowed that one of the operands has a NaN (Not-a-Number) part.
712
713     The storage of the return value is such that equality can be simply
714     checked with 'mpc_cmp (op1, op2) == 0'.
715
716
717File: mpc.info,  Node: Projection & Decomposing,  Next: Basic Arithmetic,  Prev: Complex Comparison,  Up: Complex Functions
718
7195.6 Projection and Decomposing Functions
720========================================
721
722 -- Function: int mpc_real (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
723     Set ROP to the value of the real part of OP rounded in the
724     direction RND.
725
726 -- Function: int mpc_imag (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
727     Set ROP to the value of the imaginary part of OP rounded in the
728     direction RND.
729
730 -- Macro: mpfr_t mpc_realref (mpc_t OP)
731 -- Macro: mpfr_t mpc_imagref (mpc_t OP)
732     Return a reference to the real part and imaginary part of OP,
733     respectively.  The 'mpfr' functions can be used on the result of
734     these macros (note that the 'mpfr_t' type is itself a pointer).
735
736 -- Function: int mpc_arg (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
737     Set ROP to the argument of OP, with a branch cut along the negative
738     real axis.
739
740 -- Function: int mpc_proj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
741     Compute a projection of OP onto the Riemann sphere.  Set ROP to OP
742     rounded in the direction RND, except when at least one part of OP
743     is infinite (even if the other part is a NaN) in which case the
744     real part of ROP is set to plus infinity and its imaginary part to
745     a signed zero with the same sign as the imaginary part of OP.
746
747
748File: mpc.info,  Node: Basic Arithmetic,  Next: Power Functions and Logarithm,  Prev: Projection & Decomposing,  Up: Complex Functions
749
7505.7 Basic Arithmetic Functions
751==============================
752
753All the following functions are designed in such a way that, when
754working with real numbers instead of complex numbers, their complexity
755should essentially be the same as with the GNU MPFR library, with only a
756marginal overhead due to the GNU MPC layer.
757
758 -- Function: int mpc_add (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
759          RND)
760 -- Function: int mpc_add_ui (mpc_t ROP, mpc_t OP1, unsigned long int
761          OP2, mpc_rnd_t RND)
762 -- Function: int mpc_add_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
763          mpc_rnd_t RND)
764     Set ROP to OP1 + OP2 rounded according to RND.
765
766 -- Function: int mpc_sub (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
767          RND)
768 -- Function: int mpc_sub_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
769          mpc_rnd_t RND)
770 -- Function: int mpc_fr_sub (mpc_t ROP, mpfr_t OP1, mpc_t OP2,
771          mpc_rnd_t RND)
772 -- Function: int mpc_sub_ui (mpc_t ROP, mpc_t OP1, unsigned long int
773          OP2, mpc_rnd_t RND)
774 -- Macro: int mpc_ui_sub (mpc_t ROP, unsigned long int OP1, mpc_t OP2,
775          mpc_rnd_t RND)
776 -- Function: int mpc_ui_ui_sub (mpc_t ROP, unsigned long int RE1,
777          unsigned long int IM1, mpc_t OP2, mpc_rnd_t RND)
778     Set ROP to OP1 - OP2 rounded according to RND.  For
779     'mpc_ui_ui_sub', OP1 is RE1 + IM1.
780
781 -- Function: int mpc_neg (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
782     Set ROP to -OP rounded according to RND.  Just changes the sign if
783     ROP and OP are the same variable.
784
785 -- Function: int mpc_mul (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
786          RND)
787 -- Function: int mpc_mul_ui (mpc_t ROP, mpc_t OP1, unsigned long int
788          OP2, mpc_rnd_t RND)
789 -- Function: int mpc_mul_si (mpc_t ROP, mpc_t OP1, long int OP2,
790          mpc_rnd_t RND)
791 -- Function: int mpc_mul_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
792          mpc_rnd_t RND)
793     Set ROP to OP1 times OP2 rounded according to RND.  Note: for
794     'mpc_mul', in case OP1 and OP2 have the same value, use 'mpc_sqr'
795     for better efficiency.
796
797 -- Function: int mpc_mul_i (mpc_t ROP, mpc_t OP, int SGN, mpc_rnd_t
798          RND)
799     Set ROP to OP times the imaginary unit i if SGN is non-negative,
800     set ROP to OP times -i otherwise, in both cases rounded according
801     to RND.
802
803 -- Function: int mpc_sqr (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
804     Set ROP to the square of OP rounded according to RND.
805
806 -- Function: int mpc_fma (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_t OP3,
807          mpc_rnd_t RND)
808     Set ROP to OP1*OP2+OP3, rounded according to RND, with only one
809     final rounding.
810
811 -- Function: int mpc_div (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
812          RND)
813 -- Function: int mpc_div_ui (mpc_t ROP, mpc_t OP1, unsigned long int
814          OP2, mpc_rnd_t RND)
815 -- Function: int mpc_div_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
816          mpc_rnd_t RND)
817 -- Function: int mpc_ui_div (mpc_t ROP, unsigned long int OP1, mpc_t
818          OP2, mpc_rnd_t RND)
819 -- Function: int mpc_fr_div (mpc_t ROP, mpfr_t OP1, mpc_t OP2,
820          mpc_rnd_t RND)
821     Set ROP to OP1/OP2 rounded according to RND.
822
823 -- Function: int mpc_conj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
824     Set ROP to the conjugate of OP rounded according to RND.  Just
825     changes the sign of the imaginary part if ROP and OP are the same
826     variable.
827
828 -- Function: int mpc_abs (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
829     Set the floating-point number ROP to the absolute value of OP,
830     rounded in the direction RND.
831
832 -- Function: int mpc_norm (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
833     Set the floating-point number ROP to the norm of OP (i.e., the
834     square of its absolute value), rounded in the direction RND.
835
836 -- Function: int mpc_mul_2ui (mpc_t ROP, mpc_t OP1, unsigned long int
837          OP2, mpc_rnd_t RND)
838 -- Function: int mpc_mul_2si (mpc_t ROP, mpc_t OP1, long int OP2,
839          mpc_rnd_t RND)
840     Set ROP to OP1 times 2 raised to OP2 rounded according to RND.
841     Just modifies the exponents of the real and imaginary parts by OP2
842     when ROP and OP1 are identical.
843
844 -- Function: int mpc_div_2ui (mpc_t ROP, mpc_t OP1, unsigned long int
845          OP2, mpc_rnd_t RND)
846 -- Function: int mpc_div_2si (mpc_t ROP, mpc_t OP1, long int OP2,
847          mpc_rnd_t RND)
848     Set ROP to OP1 divided by 2 raised to OP2 rounded according to RND.
849     Just modifies the exponents of the real and imaginary parts by OP2
850     when ROP and OP1 are identical.
851
852
853File: mpc.info,  Node: Power Functions and Logarithm,  Next: Trigonometric Functions,  Prev: Basic Arithmetic,  Up: Complex Functions
854
8555.8 Power Functions and Logarithm
856=================================
857
858 -- Function: int mpc_sqrt (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
859     Set ROP to the square root of OP rounded according to RND.  The
860     returned value ROP has a non-negative real part, and if its real
861     part is zero, a non-negative imaginary part.
862
863 -- Function: int mpc_pow (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
864          RND)
865 -- Function: int mpc_pow_d (mpc_t ROP, mpc_t OP1, double OP2, mpc_rnd_t
866          RND)
867 -- Function: int mpc_pow_ld (mpc_t ROP, mpc_t OP1, long double OP2,
868          mpc_rnd_t RND)
869 -- Function: int mpc_pow_si (mpc_t ROP, mpc_t OP1, long OP2, mpc_rnd_t
870          RND)
871 -- Function: int mpc_pow_ui (mpc_t ROP, mpc_t OP1, unsigned long OP2,
872          mpc_rnd_t RND)
873 -- Function: int mpc_pow_z (mpc_t ROP, mpc_t OP1, mpz_t OP2, mpc_rnd_t
874          RND)
875 -- Function: int mpc_pow_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
876          mpc_rnd_t RND)
877     Set ROP to OP1 raised to the power OP2, rounded according to RND.
878     For 'mpc_pow_d', 'mpc_pow_ld', 'mpc_pow_si', 'mpc_pow_ui',
879     'mpc_pow_z' and 'mpc_pow_fr', the imaginary part of OP2 is
880     considered as +0.  When both OP1 and OP2 are zero, the result has
881     real part 1, and imaginary part 0, with sign being the opposite of
882     that of OP2.
883
884 -- Function: int mpc_exp (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
885     Set ROP to the exponential of OP, rounded according to RND with the
886     precision of ROP.
887
888 -- Function: int mpc_log (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
889 -- Function: int mpc_log10 (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
890     Set ROP to the natural and base-10 logarithm of OP respectively,
891     rounded according to RND with the precision of ROP.  The principal
892     branch is chosen, with the branch cut on the negative real axis, so
893     that the imaginary part of the result lies in ]-\pi , \pi] and
894     ]-\pi/log(10) , \pi/log(10)] respectively.
895
896
897File: mpc.info,  Node: Trigonometric Functions,  Next: Miscellaneous Complex Functions,  Prev: Power Functions and Logarithm,  Up: Complex Functions
898
8995.9 Trigonometric Functions
900===========================
901
902 -- Function: int mpc_sin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
903     Set ROP to the sine of OP, rounded according to RND with the
904     precision of ROP.
905
906 -- Function: int mpc_cos (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
907     Set ROP to the cosine of OP, rounded according to RND with the
908     precision of ROP.
909
910 -- Function: int mpc_sin_cos (mpc_t ROP_SIN, mpc_t ROP_COS, mpc_t OP,
911          mpc_rnd_t RND_SIN, mpc_rnd_t RND_COS)
912     Set ROP_SIN to the sine of OP, rounded according to RND_SIN with
913     the precision of ROP_SIN, and ROP_COS to the cosine of OP, rounded
914     according to RND_COS with the precision of ROP_COS.
915
916 -- Function: int mpc_tan (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
917     Set ROP to the tangent of OP, rounded according to RND with the
918     precision of ROP.
919
920 -- Function: int mpc_sinh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
921     Set ROP to the hyperbolic sine of OP, rounded according to RND with
922     the precision of ROP.
923
924 -- Function: int mpc_cosh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
925     Set ROP to the hyperbolic cosine of OP, rounded according to RND
926     with the precision of ROP.
927
928 -- Function: int mpc_tanh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
929     Set ROP to the hyperbolic tangent of OP, rounded according to RND
930     with the precision of ROP.
931
932 -- Function: int mpc_asin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
933 -- Function: int mpc_acos (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
934 -- Function: int mpc_atan (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
935     Set ROP to the inverse sine, inverse cosine, inverse tangent of OP,
936     rounded according to RND with the precision of ROP.
937
938 -- Function: int mpc_asinh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
939 -- Function: int mpc_acosh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
940 -- Function: int mpc_atanh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
941     Set ROP to the inverse hyperbolic sine, inverse hyperbolic cosine,
942     inverse hyperbolic tangent of OP, rounded according to RND with the
943     precision of ROP.  The branch cut of MPC_ACOSH is (-\infty, 1).
944
945
946File: mpc.info,  Node: Miscellaneous Complex Functions,  Next: Advanced Functions,  Prev: Trigonometric Functions,  Up: Complex Functions
947
9485.10 Miscellaneous Functions
949============================
950
951 -- Function: int mpc_urandom (mpc_t ROP, gmp_randstate_t STATE)
952     Generate a uniformly distributed random complex in the unit square
953     [0, 1] x [0, 1].  Return 0, unless an exponent in the real or
954     imaginary part is not in the current exponent range, in which case
955     that part is set to NaN and a zero value is returned.  The second
956     argument is a 'gmp_randstate_t' structure which should be created
957     using the GMP 'rand_init' function, see the GMP manual.
958
959 -- Function: const char * mpc_get_version (void)
960     Return the GNU MPC version, as a null-terminated string.
961
962 -- Macro: MPC_VERSION
963 -- Macro: MPC_VERSION_MAJOR
964 -- Macro: MPC_VERSION_MINOR
965 -- Macro: MPC_VERSION_PATCHLEVEL
966 -- Macro: MPC_VERSION_STRING
967     'MPC_VERSION' is the version of GNU MPC as a preprocessing
968     constant.  'MPC_VERSION_MAJOR', 'MPC_VERSION_MINOR' and
969     'MPC_VERSION_PATCHLEVEL' are respectively the major, minor and
970     patch level of GNU MPC version, as preprocessing constants.
971     'MPC_VERSION_STRING' is the version as a string constant, which can
972     be compared to the result of 'mpc_get_version' to check at run time
973     the header file and library used match:
974          if (strcmp (mpc_get_version (), MPC_VERSION_STRING))
975            fprintf (stderr, "Warning: header and library do not match\n");
976     Note: Obtaining different strings is not necessarily an error, as
977     in general, a program compiled with some old GNU MPC version can be
978     dynamically linked with a newer GNU MPC library version (if allowed
979     by the library versioning system).
980
981 -- Macro: long MPC_VERSION_NUM (MAJOR, MINOR, PATCHLEVEL)
982     Create an integer in the same format as used by 'MPC_VERSION' from
983     the given MAJOR, MINOR and PATCHLEVEL.  Here is an example of how
984     to check the GNU MPC version at compile time:
985          #if (!defined(MPC_VERSION) || (MPC_VERSION<MPC_VERSION_NUM(2,1,0)))
986          # error "Wrong GNU MPC version."
987          #endif
988
989
990File: mpc.info,  Node: Advanced Functions,  Next: Internals,  Prev: Miscellaneous Complex Functions,  Up: Complex Functions
991
9925.11 Advanced Functions
993=======================
994
995 -- Macro: MPC_SET_X_Y (REAL_SUFFIX, IMAG_SUFFIX, ROP, REAL, IMAG, RND)
996     The macro MPC_SET_X_Y is designed to serve as the body of an
997     assignment function and cannot be used by itself.  The REAL_SUFFIX
998     and IMAG_SUFFIX parameters are the types of the real and imaginary
999     part, that is, the 'x' in the 'mpfr_set_x' function one would use
1000     to set the part; for the mpfr type, use 'fr'.  REAL (respectively
1001     IMAG) is the value you want to assign to the real (resp.
1002     imaginary) part, its type must conform to REAL_SUFFIX (resp.
1003     IMAG_SUFFIX).  RND is the 'mpc_rnd_t' rounding mode.  The return
1004     value is the usual inexact value (*note Return Value:
1005     return-value.).
1006
1007     For instance, you can define mpc_set_ui_fr as follows:
1008          int mpc_set_ui_fr (mpc_t rop, long int re, double im, mpc_rnd_t rnd)
1009              MPC_SET_X_Y (ui, fr, rop, re, im, rnd);
1010
1011
1012File: mpc.info,  Node: Internals,  Prev: Advanced Functions,  Up: Complex Functions
1013
10145.12 Internals
1015==============
1016
1017These macros and functions are mainly designed for the implementation of
1018GNU MPC, but may be useful for users too.  However, no upward
1019compatibility is guaranteed.  You need to include 'mpc-impl.h' to use
1020them.
1021
1022   The macro 'MPC_MAX_PREC(z)' gives the maximum of the precisions of
1023the real and imaginary parts of a complex number.
1024
1025
1026File: mpc.info,  Node: References,  Next: Concept Index,  Prev: Complex Functions,  Up: Top
1027
1028References
1029**********
1030
1031   * Torbjo"rn Granlund et al.  'gmp' - GNU multiprecision library.
1032     Version 4.2.4, <http://gmplib.org/>.
1033
1034   * Guillaume Hanrot, Vincent Lefe`vre, Patrick Pe'lissier, Paul
1035     Zimmermann et al.  'mpfr' - A library for multiple-precision
1036     floating-point computations with exact rounding.  Version 2.4.1,
1037     <http://www.mpfr.org>.
1038
1039   * IEEE standard for binary floating-point arithmetic, Technical
1040     Report ANSI-IEEE Standard 754-1985, New York, 1985.  Approved March
1041     21, 1985: IEEE Standards Board; approved July 26, 1985: American
1042     National Standards Institute, 18 pages.
1043
1044   * Donald E. Knuth, "The Art of Computer Programming", vol 2,
1045     "Seminumerical Algorithms", 2nd edition, Addison-Wesley, 1981.
1046
1047   * ISO/IEC 9899:1999, Programming languages ��� C.
1048
1049
1050File: mpc.info,  Node: Concept Index,  Next: Function Index,  Prev: References,  Up: Top
1051
1052Concept Index
1053*************
1054
1055[index]
1056* Menu:
1057
1058* Arithmetic functions:                  Basic Arithmetic.     (line  6)
1059* Comparison functions:                  Complex Comparison.   (line  6)
1060* Complex arithmetic functions:          Basic Arithmetic.     (line  6)
1061* Complex assignment functions:          Assigning Complex Numbers.
1062                                                               (line  6)
1063* Complex comparisons functions:         Complex Comparison.   (line  6)
1064* Complex functions:                     Complex Functions.    (line  6)
1065* Complex number:                        GNU MPC Basics.       (line 15)
1066* Conditions for copying GNU MPC:        Copying.              (line  6)
1067* Conversion functions:                  Converting Complex Numbers.
1068                                                               (line  6)
1069* Copying conditions:                    Copying.              (line  6)
1070* Installation:                          Installing GNU MPC.   (line  6)
1071* Logarithm:                             Power Functions and Logarithm.
1072                                                               (line  6)
1073* Miscellaneous complex functions:       Miscellaneous Complex Functions.
1074                                                               (line  6)
1075* 'mpc.h':                               GNU MPC Basics.       (line  6)
1076* Power functions:                       Power Functions and Logarithm.
1077                                                               (line  6)
1078* Precision:                             GNU MPC Basics.       (line 19)
1079* Projection and Decomposing Functions:  Projection & Decomposing.
1080                                                               (line  6)
1081* Reporting bugs:                        Reporting Bugs.       (line  6)
1082* Rounding Mode:                         GNU MPC Basics.       (line 24)
1083* String and stream input and output:    String and Stream Input and Output.
1084                                                               (line  6)
1085* Trigonometric functions:               Trigonometric Functions.
1086                                                               (line  6)
1087* User-defined precision:                Complex Functions.    (line 12)
1088
1089
1090File: mpc.info,  Node: Function Index,  Next: GNU Free Documentation License,  Prev: Concept Index,  Up: Top
1091
1092Function Index
1093**************
1094
1095[index]
1096* Menu:
1097
1098* _Complex:                              Converting Complex Numbers.
1099                                                              (line   9)
1100* mpc_abs:                               Basic Arithmetic.    (line  81)
1101* mpc_acos:                              Trigonometric Functions.
1102                                                              (line  37)
1103* mpc_acosh:                             Trigonometric Functions.
1104                                                              (line  43)
1105* mpc_add:                               Basic Arithmetic.    (line  11)
1106* mpc_add_fr:                            Basic Arithmetic.    (line  15)
1107* mpc_add_ui:                            Basic Arithmetic.    (line  13)
1108* mpc_arg:                               Projection & Decomposing.
1109                                                              (line  20)
1110* mpc_asin:                              Trigonometric Functions.
1111                                                              (line  36)
1112* mpc_asinh:                             Trigonometric Functions.
1113                                                              (line  42)
1114* mpc_atan:                              Trigonometric Functions.
1115                                                              (line  38)
1116* mpc_atanh:                             Trigonometric Functions.
1117                                                              (line  44)
1118* mpc_clear:                             Initializing Complex Numbers.
1119                                                              (line  21)
1120* mpc_cmp:                               Complex Comparison.  (line   6)
1121* mpc_cmp_si:                            Complex Comparison.  (line   9)
1122* mpc_cmp_si_si:                         Complex Comparison.  (line   7)
1123* mpc_conj:                              Basic Arithmetic.    (line  76)
1124* mpc_cos:                               Trigonometric Functions.
1125                                                              (line  10)
1126* mpc_cosh:                              Trigonometric Functions.
1127                                                              (line  28)
1128* mpc_div:                               Basic Arithmetic.    (line  64)
1129* mpc_div_2si:                           Basic Arithmetic.    (line  99)
1130* mpc_div_2ui:                           Basic Arithmetic.    (line  97)
1131* mpc_div_fr:                            Basic Arithmetic.    (line  68)
1132* mpc_div_ui:                            Basic Arithmetic.    (line  66)
1133* mpc_exp:                               Power Functions and Logarithm.
1134                                                              (line  32)
1135* mpc_fma:                               Basic Arithmetic.    (line  59)
1136* mpc_free_str:                          String and Stream Input and Output.
1137                                                              (line  66)
1138* mpc_fr_div:                            Basic Arithmetic.    (line  72)
1139* mpc_fr_sub:                            Basic Arithmetic.    (line  23)
1140* mpc_get_ldc:                           Converting Complex Numbers.
1141                                                              (line  10)
1142* mpc_get_prec:                          Initializing Complex Numbers.
1143                                                              (line  49)
1144* mpc_get_prec2:                         Initializing Complex Numbers.
1145                                                              (line  53)
1146* mpc_get_str:                           String and Stream Input and Output.
1147                                                              (line  48)
1148* mpc_get_version:                       Miscellaneous Complex Functions.
1149                                                              (line  14)
1150* mpc_imag:                              Projection & Decomposing.
1151                                                              (line  10)
1152* mpc_imagref:                           Projection & Decomposing.
1153                                                              (line  15)
1154* mpc_init2:                             Initializing Complex Numbers.
1155                                                              (line  10)
1156* mpc_init3:                             Initializing Complex Numbers.
1157                                                              (line  15)
1158* mpc_inp_str:                           String and Stream Input and Output.
1159                                                              (line  74)
1160* mpc_log:                               Power Functions and Logarithm.
1161                                                              (line  36)
1162* mpc_log10:                             Power Functions and Logarithm.
1163                                                              (line  37)
1164* mpc_mul:                               Basic Arithmetic.    (line  38)
1165* mpc_mul_2si:                           Basic Arithmetic.    (line  91)
1166* mpc_mul_2ui:                           Basic Arithmetic.    (line  89)
1167* mpc_mul_fr:                            Basic Arithmetic.    (line  44)
1168* mpc_mul_i:                             Basic Arithmetic.    (line  50)
1169* mpc_mul_si:                            Basic Arithmetic.    (line  42)
1170* mpc_mul_ui:                            Basic Arithmetic.    (line  40)
1171* mpc_neg:                               Basic Arithmetic.    (line  34)
1172* mpc_norm:                              Basic Arithmetic.    (line  85)
1173* mpc_out_str:                           String and Stream Input and Output.
1174                                                              (line 109)
1175* mpc_pow:                               Power Functions and Logarithm.
1176                                                              (line  11)
1177* mpc_pow_d:                             Power Functions and Logarithm.
1178                                                              (line  13)
1179* mpc_pow_fr:                            Power Functions and Logarithm.
1180                                                              (line  23)
1181* mpc_pow_ld:                            Power Functions and Logarithm.
1182                                                              (line  15)
1183* mpc_pow_si:                            Power Functions and Logarithm.
1184                                                              (line  17)
1185* mpc_pow_ui:                            Power Functions and Logarithm.
1186                                                              (line  19)
1187* mpc_pow_z:                             Power Functions and Logarithm.
1188                                                              (line  21)
1189* mpc_proj:                              Projection & Decomposing.
1190                                                              (line  24)
1191* mpc_real:                              Projection & Decomposing.
1192                                                              (line   6)
1193* mpc_realref:                           Projection & Decomposing.
1194                                                              (line  14)
1195* 'mpc_rnd_t':                           GNU MPC Basics.      (line  24)
1196* mpc_set:                               Assigning Complex Numbers.
1197                                                              (line  16)
1198* mpc_set_d:                             Assigning Complex Numbers.
1199                                                              (line  25)
1200* mpc_set_dc:                            Assigning Complex Numbers.
1201                                                              (line  27)
1202* mpc_set_d_d:                           Assigning Complex Numbers.
1203                                                              (line  54)
1204* mpc_set_f:                             Assigning Complex Numbers.
1205                                                              (line  33)
1206* mpc_set_fr:                            Assigning Complex Numbers.
1207                                                              (line  34)
1208* mpc_set_fr_fr:                         Assigning Complex Numbers.
1209                                                              (line  64)
1210* mpc_set_f_f:                           Assigning Complex Numbers.
1211                                                              (line  62)
1212* mpc_set_ld:                            Assigning Complex Numbers.
1213                                                              (line  26)
1214* mpc_set_ldc:                           Assigning Complex Numbers.
1215                                                              (line  29)
1216* mpc_set_ld_ld:                         Assigning Complex Numbers.
1217                                                              (line  56)
1218* mpc_set_nan:                           Assigning Complex Numbers.
1219                                                              (line  79)
1220* mpc_set_prec:                          Initializing Complex Numbers.
1221                                                              (line  41)
1222* mpc_set_q:                             Assigning Complex Numbers.
1223                                                              (line  32)
1224* mpc_set_q_q:                           Assigning Complex Numbers.
1225                                                              (line  60)
1226* mpc_set_si:                            Assigning Complex Numbers.
1227                                                              (line  22)
1228* mpc_set_si_si:                         Assigning Complex Numbers.
1229                                                              (line  48)
1230* mpc_set_sj:                            Assigning Complex Numbers.
1231                                                              (line  24)
1232* mpc_set_sj_sj:                         Assigning Complex Numbers.
1233                                                              (line  52)
1234* mpc_set_str:                           String and Stream Input and Output.
1235                                                              (line  35)
1236* mpc_set_ui:                            Assigning Complex Numbers.
1237                                                              (line  20)
1238* mpc_set_ui_ui:                         Assigning Complex Numbers.
1239                                                              (line  46)
1240* mpc_set_uj:                            Assigning Complex Numbers.
1241                                                              (line  23)
1242* mpc_set_uj_uj:                         Assigning Complex Numbers.
1243                                                              (line  50)
1244* MPC_SET_X_Y:                           Advanced Functions.  (line   6)
1245* mpc_set_z:                             Assigning Complex Numbers.
1246                                                              (line  31)
1247* mpc_set_z_z:                           Assigning Complex Numbers.
1248                                                              (line  58)
1249* mpc_sin:                               Trigonometric Functions.
1250                                                              (line   6)
1251* mpc_sinh:                              Trigonometric Functions.
1252                                                              (line  24)
1253* mpc_sin_cos:                           Trigonometric Functions.
1254                                                              (line  14)
1255* mpc_sqr:                               Basic Arithmetic.    (line  56)
1256* mpc_sqrt:                              Power Functions and Logarithm.
1257                                                              (line   6)
1258* mpc_strtoc:                            String and Stream Input and Output.
1259                                                              (line   6)
1260* mpc_sub:                               Basic Arithmetic.    (line  19)
1261* mpc_sub_fr:                            Basic Arithmetic.    (line  21)
1262* mpc_sub_ui:                            Basic Arithmetic.    (line  25)
1263* mpc_swap:                              Assigning Complex Numbers.
1264                                                              (line  82)
1265* 'mpc_t':                               GNU MPC Basics.      (line  15)
1266* mpc_tan:                               Trigonometric Functions.
1267                                                              (line  20)
1268* mpc_tanh:                              Trigonometric Functions.
1269                                                              (line  32)
1270* mpc_ui_div:                            Basic Arithmetic.    (line  70)
1271* mpc_ui_sub:                            Basic Arithmetic.    (line  27)
1272* mpc_ui_ui_sub:                         Basic Arithmetic.    (line  29)
1273* mpc_urandom:                           Miscellaneous Complex Functions.
1274                                                              (line   6)
1275* MPC_VERSION:                           Miscellaneous Complex Functions.
1276                                                              (line  17)
1277* MPC_VERSION_MAJOR:                     Miscellaneous Complex Functions.
1278                                                              (line  18)
1279* MPC_VERSION_MINOR:                     Miscellaneous Complex Functions.
1280                                                              (line  19)
1281* MPC_VERSION_NUM:                       Miscellaneous Complex Functions.
1282                                                              (line  36)
1283* MPC_VERSION_PATCHLEVEL:                Miscellaneous Complex Functions.
1284                                                              (line  20)
1285* MPC_VERSION_STRING:                    Miscellaneous Complex Functions.
1286                                                              (line  21)
1287* 'mpfr_prec_t':                         GNU MPC Basics.      (line  19)
1288
1289
1290File: mpc.info,  Node: GNU Free Documentation License,  Prev: Function Index,  Up: Top
1291
1292Appendix A GNU Free Documentation License
1293*****************************************
1294
1295                     Version 1.3, 3 November 2008
1296
1297     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
1298     <http://fsf.org/>
1299
1300     Everyone is permitted to copy and distribute verbatim copies
1301     of this license document, but changing it is not allowed.
1302
1303  0. PREAMBLE
1304
1305     The purpose of this License is to make a manual, textbook, or other
1306     functional and useful document "free" in the sense of freedom: to
1307     assure everyone the effective freedom to copy and redistribute it,
1308     with or without modifying it, either commercially or
1309     noncommercially.  Secondarily, this License preserves for the
1310     author and publisher a way to get credit for their work, while not
1311     being considered responsible for modifications made by others.
1312
1313     This License is a kind of "copyleft", which means that derivative
1314     works of the document must themselves be free in the same sense.
1315     It complements the GNU General Public License, which is a copyleft
1316     license designed for free software.
1317
1318     We have designed this License in order to use it for manuals for
1319     free software, because free software needs free documentation: a
1320     free program should come with manuals providing the same freedoms
1321     that the software does.  But this License is not limited to
1322     software manuals; it can be used for any textual work, regardless
1323     of subject matter or whether it is published as a printed book.  We
1324     recommend this License principally for works whose purpose is
1325     instruction or reference.
1326
1327  1. APPLICABILITY AND DEFINITIONS
1328
1329     This License applies to any manual or other work, in any medium,
1330     that contains a notice placed by the copyright holder saying it can
1331     be distributed under the terms of this License.  Such a notice
1332     grants a world-wide, royalty-free license, unlimited in duration,
1333     to use that work under the conditions stated herein.  The
1334     "Document", below, refers to any such manual or work.  Any member
1335     of the public is a licensee, and is addressed as "you".  You accept
1336     the license if you copy, modify or distribute the work in a way
1337     requiring permission under copyright law.
1338
1339     A "Modified Version" of the Document means any work containing the
1340     Document or a portion of it, either copied verbatim, or with
1341     modifications and/or translated into another language.
1342
1343     A "Secondary Section" is a named appendix or a front-matter section
1344     of the Document that deals exclusively with the relationship of the
1345     publishers or authors of the Document to the Document's overall
1346     subject (or to related matters) and contains nothing that could
1347     fall directly within that overall subject.  (Thus, if the Document
1348     is in part a textbook of mathematics, a Secondary Section may not
1349     explain any mathematics.)  The relationship could be a matter of
1350     historical connection with the subject or with related matters, or
1351     of legal, commercial, philosophical, ethical or political position
1352     regarding them.
1353
1354     The "Invariant Sections" are certain Secondary Sections whose
1355     titles are designated, as being those of Invariant Sections, in the
1356     notice that says that the Document is released under this License.
1357     If a section does not fit the above definition of Secondary then it
1358     is not allowed to be designated as Invariant.  The Document may
1359     contain zero Invariant Sections.  If the Document does not identify
1360     any Invariant Sections then there are none.
1361
1362     The "Cover Texts" are certain short passages of text that are
1363     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
1364     that says that the Document is released under this License.  A
1365     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
1366     be at most 25 words.
1367
1368     A "Transparent" copy of the Document means a machine-readable copy,
1369     represented in a format whose specification is available to the
1370     general public, that is suitable for revising the document
1371     straightforwardly with generic text editors or (for images composed
1372     of pixels) generic paint programs or (for drawings) some widely
1373     available drawing editor, and that is suitable for input to text
1374     formatters or for automatic translation to a variety of formats
1375     suitable for input to text formatters.  A copy made in an otherwise
1376     Transparent file format whose markup, or absence of markup, has
1377     been arranged to thwart or discourage subsequent modification by
1378     readers is not Transparent.  An image format is not Transparent if
1379     used for any substantial amount of text.  A copy that is not
1380     "Transparent" is called "Opaque".
1381
1382     Examples of suitable formats for Transparent copies include plain
1383     ASCII without markup, Texinfo input format, LaTeX input format,
1384     SGML or XML using a publicly available DTD, and standard-conforming
1385     simple HTML, PostScript or PDF designed for human modification.
1386     Examples of transparent image formats include PNG, XCF and JPG.
1387     Opaque formats include proprietary formats that can be read and
1388     edited only by proprietary word processors, SGML or XML for which
1389     the DTD and/or processing tools are not generally available, and
1390     the machine-generated HTML, PostScript or PDF produced by some word
1391     processors for output purposes only.
1392
1393     The "Title Page" means, for a printed book, the title page itself,
1394     plus such following pages as are needed to hold, legibly, the
1395     material this License requires to appear in the title page.  For
1396     works in formats which do not have any title page as such, "Title
1397     Page" means the text near the most prominent appearance of the
1398     work's title, preceding the beginning of the body of the text.
1399
1400     The "publisher" means any person or entity that distributes copies
1401     of the Document to the public.
1402
1403     A section "Entitled XYZ" means a named subunit of the Document
1404     whose title either is precisely XYZ or contains XYZ in parentheses
1405     following text that translates XYZ in another language.  (Here XYZ
1406     stands for a specific section name mentioned below, such as
1407     "Acknowledgements", "Dedications", "Endorsements", or "History".)
1408     To "Preserve the Title" of such a section when you modify the
1409     Document means that it remains a section "Entitled XYZ" according
1410     to this definition.
1411
1412     The Document may include Warranty Disclaimers next to the notice
1413     which states that this License applies to the Document.  These
1414     Warranty Disclaimers are considered to be included by reference in
1415     this License, but only as regards disclaiming warranties: any other
1416     implication that these Warranty Disclaimers may have is void and
1417     has no effect on the meaning of this License.
1418
1419  2. VERBATIM COPYING
1420
1421     You may copy and distribute the Document in any medium, either
1422     commercially or noncommercially, provided that this License, the
1423     copyright notices, and the license notice saying this License
1424     applies to the Document are reproduced in all copies, and that you
1425     add no other conditions whatsoever to those of this License.  You
1426     may not use technical measures to obstruct or control the reading
1427     or further copying of the copies you make or distribute.  However,
1428     you may accept compensation in exchange for copies.  If you
1429     distribute a large enough number of copies you must also follow the
1430     conditions in section 3.
1431
1432     You may also lend copies, under the same conditions stated above,
1433     and you may publicly display copies.
1434
1435  3. COPYING IN QUANTITY
1436
1437     If you publish printed copies (or copies in media that commonly
1438     have printed covers) of the Document, numbering more than 100, and
1439     the Document's license notice requires Cover Texts, you must
1440     enclose the copies in covers that carry, clearly and legibly, all
1441     these Cover Texts: Front-Cover Texts on the front cover, and
1442     Back-Cover Texts on the back cover.  Both covers must also clearly
1443     and legibly identify you as the publisher of these copies.  The
1444     front cover must present the full title with all words of the title
1445     equally prominent and visible.  You may add other material on the
1446     covers in addition.  Copying with changes limited to the covers, as
1447     long as they preserve the title of the Document and satisfy these
1448     conditions, can be treated as verbatim copying in other respects.
1449
1450     If the required texts for either cover are too voluminous to fit
1451     legibly, you should put the first ones listed (as many as fit
1452     reasonably) on the actual cover, and continue the rest onto
1453     adjacent pages.
1454
1455     If you publish or distribute Opaque copies of the Document
1456     numbering more than 100, you must either include a machine-readable
1457     Transparent copy along with each Opaque copy, or state in or with
1458     each Opaque copy a computer-network location from which the general
1459     network-using public has access to download using public-standard
1460     network protocols a complete Transparent copy of the Document, free
1461     of added material.  If you use the latter option, you must take
1462     reasonably prudent steps, when you begin distribution of Opaque
1463     copies in quantity, to ensure that this Transparent copy will
1464     remain thus accessible at the stated location until at least one
1465     year after the last time you distribute an Opaque copy (directly or
1466     through your agents or retailers) of that edition to the public.
1467
1468     It is requested, but not required, that you contact the authors of
1469     the Document well before redistributing any large number of copies,
1470     to give them a chance to provide you with an updated version of the
1471     Document.
1472
1473  4. MODIFICATIONS
1474
1475     You may copy and distribute a Modified Version of the Document
1476     under the conditions of sections 2 and 3 above, provided that you
1477     release the Modified Version under precisely this License, with the
1478     Modified Version filling the role of the Document, thus licensing
1479     distribution and modification of the Modified Version to whoever
1480     possesses a copy of it.  In addition, you must do these things in
1481     the Modified Version:
1482
1483       A. Use in the Title Page (and on the covers, if any) a title
1484          distinct from that of the Document, and from those of previous
1485          versions (which should, if there were any, be listed in the
1486          History section of the Document).  You may use the same title
1487          as a previous version if the original publisher of that
1488          version gives permission.
1489
1490       B. List on the Title Page, as authors, one or more persons or
1491          entities responsible for authorship of the modifications in
1492          the Modified Version, together with at least five of the
1493          principal authors of the Document (all of its principal
1494          authors, if it has fewer than five), unless they release you
1495          from this requirement.
1496
1497       C. State on the Title page the name of the publisher of the
1498          Modified Version, as the publisher.
1499
1500       D. Preserve all the copyright notices of the Document.
1501
1502       E. Add an appropriate copyright notice for your modifications
1503          adjacent to the other copyright notices.
1504
1505       F. Include, immediately after the copyright notices, a license
1506          notice giving the public permission to use the Modified
1507          Version under the terms of this License, in the form shown in
1508          the Addendum below.
1509
1510       G. Preserve in that license notice the full lists of Invariant
1511          Sections and required Cover Texts given in the Document's
1512          license notice.
1513
1514       H. Include an unaltered copy of this License.
1515
1516       I. Preserve the section Entitled "History", Preserve its Title,
1517          and add to it an item stating at least the title, year, new
1518          authors, and publisher of the Modified Version as given on the
1519          Title Page.  If there is no section Entitled "History" in the
1520          Document, create one stating the title, year, authors, and
1521          publisher of the Document as given on its Title Page, then add
1522          an item describing the Modified Version as stated in the
1523          previous sentence.
1524
1525       J. Preserve the network location, if any, given in the Document
1526          for public access to a Transparent copy of the Document, and
1527          likewise the network locations given in the Document for
1528          previous versions it was based on.  These may be placed in the
1529          "History" section.  You may omit a network location for a work
1530          that was published at least four years before the Document
1531          itself, or if the original publisher of the version it refers
1532          to gives permission.
1533
1534       K. For any section Entitled "Acknowledgements" or "Dedications",
1535          Preserve the Title of the section, and preserve in the section
1536          all the substance and tone of each of the contributor
1537          acknowledgements and/or dedications given therein.
1538
1539       L. Preserve all the Invariant Sections of the Document, unaltered
1540          in their text and in their titles.  Section numbers or the
1541          equivalent are not considered part of the section titles.
1542
1543       M. Delete any section Entitled "Endorsements".  Such a section
1544          may not be included in the Modified Version.
1545
1546       N. Do not retitle any existing section to be Entitled
1547          "Endorsements" or to conflict in title with any Invariant
1548          Section.
1549
1550       O. Preserve any Warranty Disclaimers.
1551
1552     If the Modified Version includes new front-matter sections or
1553     appendices that qualify as Secondary Sections and contain no
1554     material copied from the Document, you may at your option designate
1555     some or all of these sections as invariant.  To do this, add their
1556     titles to the list of Invariant Sections in the Modified Version's
1557     license notice.  These titles must be distinct from any other
1558     section titles.
1559
1560     You may add a section Entitled "Endorsements", provided it contains
1561     nothing but endorsements of your Modified Version by various
1562     parties--for example, statements of peer review or that the text
1563     has been approved by an organization as the authoritative
1564     definition of a standard.
1565
1566     You may add a passage of up to five words as a Front-Cover Text,
1567     and a passage of up to 25 words as a Back-Cover Text, to the end of
1568     the list of Cover Texts in the Modified Version.  Only one passage
1569     of Front-Cover Text and one of Back-Cover Text may be added by (or
1570     through arrangements made by) any one entity.  If the Document
1571     already includes a cover text for the same cover, previously added
1572     by you or by arrangement made by the same entity you are acting on
1573     behalf of, you may not add another; but you may replace the old
1574     one, on explicit permission from the previous publisher that added
1575     the old one.
1576
1577     The author(s) and publisher(s) of the Document do not by this
1578     License give permission to use their names for publicity for or to
1579     assert or imply endorsement of any Modified Version.
1580
1581  5. COMBINING DOCUMENTS
1582
1583     You may combine the Document with other documents released under
1584     this License, under the terms defined in section 4 above for
1585     modified versions, provided that you include in the combination all
1586     of the Invariant Sections of all of the original documents,
1587     unmodified, and list them all as Invariant Sections of your
1588     combined work in its license notice, and that you preserve all
1589     their Warranty Disclaimers.
1590
1591     The combined work need only contain one copy of this License, and
1592     multiple identical Invariant Sections may be replaced with a single
1593     copy.  If there are multiple Invariant Sections with the same name
1594     but different contents, make the title of each such section unique
1595     by adding at the end of it, in parentheses, the name of the
1596     original author or publisher of that section if known, or else a
1597     unique number.  Make the same adjustment to the section titles in
1598     the list of Invariant Sections in the license notice of the
1599     combined work.
1600
1601     In the combination, you must combine any sections Entitled
1602     "History" in the various original documents, forming one section
1603     Entitled "History"; likewise combine any sections Entitled
1604     "Acknowledgements", and any sections Entitled "Dedications".  You
1605     must delete all sections Entitled "Endorsements."
1606
1607  6. COLLECTIONS OF DOCUMENTS
1608
1609     You may make a collection consisting of the Document and other
1610     documents released under this License, and replace the individual
1611     copies of this License in the various documents with a single copy
1612     that is included in the collection, provided that you follow the
1613     rules of this License for verbatim copying of each of the documents
1614     in all other respects.
1615
1616     You may extract a single document from such a collection, and
1617     distribute it individually under this License, provided you insert
1618     a copy of this License into the extracted document, and follow this
1619     License in all other respects regarding verbatim copying of that
1620     document.
1621
1622  7. AGGREGATION WITH INDEPENDENT WORKS
1623
1624     A compilation of the Document or its derivatives with other
1625     separate and independent documents or works, in or on a volume of a
1626     storage or distribution medium, is called an "aggregate" if the
1627     copyright resulting from the compilation is not used to limit the
1628     legal rights of the compilation's users beyond what the individual
1629     works permit.  When the Document is included in an aggregate, this
1630     License does not apply to the other works in the aggregate which
1631     are not themselves derivative works of the Document.
1632
1633     If the Cover Text requirement of section 3 is applicable to these
1634     copies of the Document, then if the Document is less than one half
1635     of the entire aggregate, the Document's Cover Texts may be placed
1636     on covers that bracket the Document within the aggregate, or the
1637     electronic equivalent of covers if the Document is in electronic
1638     form.  Otherwise they must appear on printed covers that bracket
1639     the whole aggregate.
1640
1641  8. TRANSLATION
1642
1643     Translation is considered a kind of modification, so you may
1644     distribute translations of the Document under the terms of section
1645     4.  Replacing Invariant Sections with translations requires special
1646     permission from their copyright holders, but you may include
1647     translations of some or all Invariant Sections in addition to the
1648     original versions of these Invariant Sections.  You may include a
1649     translation of this License, and all the license notices in the
1650     Document, and any Warranty Disclaimers, provided that you also
1651     include the original English version of this License and the
1652     original versions of those notices and disclaimers.  In case of a
1653     disagreement between the translation and the original version of
1654     this License or a notice or disclaimer, the original version will
1655     prevail.
1656
1657     If a section in the Document is Entitled "Acknowledgements",
1658     "Dedications", or "History", the requirement (section 4) to
1659     Preserve its Title (section 1) will typically require changing the
1660     actual title.
1661
1662  9. TERMINATION
1663
1664     You may not copy, modify, sublicense, or distribute the Document
1665     except as expressly provided under this License.  Any attempt
1666     otherwise to copy, modify, sublicense, or distribute it is void,
1667     and will automatically terminate your rights under this License.
1668
1669     However, if you cease all violation of this License, then your
1670     license from a particular copyright holder is reinstated (a)
1671     provisionally, unless and until the copyright holder explicitly and
1672     finally terminates your license, and (b) permanently, if the
1673     copyright holder fails to notify you of the violation by some
1674     reasonable means prior to 60 days after the cessation.
1675
1676     Moreover, your license from a particular copyright holder is
1677     reinstated permanently if the copyright holder notifies you of the
1678     violation by some reasonable means, this is the first time you have
1679     received notice of violation of this License (for any work) from
1680     that copyright holder, and you cure the violation prior to 30 days
1681     after your receipt of the notice.
1682
1683     Termination of your rights under this section does not terminate
1684     the licenses of parties who have received copies or rights from you
1685     under this License.  If your rights have been terminated and not
1686     permanently reinstated, receipt of a copy of some or all of the
1687     same material does not give you any rights to use it.
1688
1689  10. FUTURE REVISIONS OF THIS LICENSE
1690
1691     The Free Software Foundation may publish new, revised versions of
1692     the GNU Free Documentation License from time to time.  Such new
1693     versions will be similar in spirit to the present version, but may
1694     differ in detail to address new problems or concerns.  See
1695     <http://www.gnu.org/copyleft/>.
1696
1697     Each version of the License is given a distinguishing version
1698     number.  If the Document specifies that a particular numbered
1699     version of this License "or any later version" applies to it, you
1700     have the option of following the terms and conditions either of
1701     that specified version or of any later version that has been
1702     published (not as a draft) by the Free Software Foundation.  If the
1703     Document does not specify a version number of this License, you may
1704     choose any version ever published (not as a draft) by the Free
1705     Software Foundation.  If the Document specifies that a proxy can
1706     decide which future versions of this License can be used, that
1707     proxy's public statement of acceptance of a version permanently
1708     authorizes you to choose that version for the Document.
1709
1710  11. RELICENSING
1711
1712     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
1713     World Wide Web server that publishes copyrightable works and also
1714     provides prominent facilities for anybody to edit those works.  A
1715     public wiki that anybody can edit is an example of such a server.
1716     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
1717     site means any set of copyrightable works thus published on the MMC
1718     site.
1719
1720     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
1721     license published by Creative Commons Corporation, a not-for-profit
1722     corporation with a principal place of business in San Francisco,
1723     California, as well as future copyleft versions of that license
1724     published by that same organization.
1725
1726     "Incorporate" means to publish or republish a Document, in whole or
1727     in part, as part of another Document.
1728
1729     An MMC is "eligible for relicensing" if it is licensed under this
1730     License, and if all works that were first published under this
1731     License somewhere other than this MMC, and subsequently
1732     incorporated in whole or in part into the MMC, (1) had no cover
1733     texts or invariant sections, and (2) were thus incorporated prior
1734     to November 1, 2008.
1735
1736     The operator of an MMC Site may republish an MMC contained in the
1737     site under CC-BY-SA on the same site at any time before August 1,
1738     2009, provided the MMC is eligible for relicensing.
1739
1740ADDENDUM: How to use this License for your documents
1741====================================================
1742
1743To use this License in a document you have written, include a copy of
1744the License in the document and put the following copyright and license
1745notices just after the title page:
1746
1747       Copyright (C)  YEAR  YOUR NAME.
1748       Permission is granted to copy, distribute and/or modify this document
1749       under the terms of the GNU Free Documentation License, Version 1.3
1750       or any later version published by the Free Software Foundation;
1751       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
1752       Texts.  A copy of the license is included in the section entitled ``GNU
1753       Free Documentation License''.
1754
1755   If you have Invariant Sections, Front-Cover Texts and Back-Cover
1756Texts, replace the "with...Texts."  line with this:
1757
1758         with the Invariant Sections being LIST THEIR TITLES, with
1759         the Front-Cover Texts being LIST, and with the Back-Cover Texts
1760         being LIST.
1761
1762   If you have Invariant Sections without Cover Texts, or some other
1763combination of the three, merge those two alternatives to suit the
1764situation.
1765
1766   If your document contains nontrivial examples of program code, we
1767recommend releasing these examples in parallel under your choice of free
1768software license, such as the GNU General Public License, to permit
1769their use in free software.
1770
1771
1772
1773Tag Table:
1774Node: Top736
1775Node: Copying1443
1776Node: Introduction to GNU MPC2215
1777Node: Installing GNU MPC2934
1778Node: Reporting Bugs8019
1779Node: GNU MPC Basics9363
1780Ref: return-value13040
1781Node: Complex Functions14491
1782Node: Initializing Complex Numbers15651
1783Node: Assigning Complex Numbers18038
1784Node: Converting Complex Numbers22438
1785Node: String and Stream Input and Output23063
1786Node: Complex Comparison29620
1787Node: Projection & Decomposing30695
1788Node: Basic Arithmetic32072
1789Node: Power Functions and Logarithm36645
1790Node: Trigonometric Functions38712
1791Node: Miscellaneous Complex Functions40937
1792Node: Advanced Functions43113
1793Node: Internals44186
1794Node: References44637
1795Node: Concept Index45540
1796Node: Function Index47854
1797Node: GNU Free Documentation License61638
1798
1799End Tag Table
1800