mpc.info revision 1.1.1.4
1This is mpc.info, produced by makeinfo version 6.7 from mpc.texi.
2
3This manual is for GNU MPC, a library for multiple precision complex
4arithmetic, version 1.2.0 of August 2020.
5
6   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
72011, 2012, 2013, 2016, 2018, 2020 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.2.0
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 5.0.0 or
88higher) and GNU MPFR (version 4.1.0 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.2.0.tar.gz'
98
99  2. 'cd mpc-1.2.0'
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 initialise
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 initialised once, or at least cleared out
316between each initialization.  After a variable has been initialised, it
317may be assigned to any number of times.
318
319   For efficiency reasons, avoid to initialise and clear out a variable
320in loops.  Instead, initialise 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 reinitialise 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 initialised 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     Initialise Z to precision PREC bits and set its real and imaginary
426     parts to NaN. Normally, a variable should be initialised 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     Initialise 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 initialise 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 initialised 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 becomes 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 -- Function: int mpc_cmp_abs (mpc_t OP1, mpc_t OP2)
717
718     Compare the absolute values of OP1 and OP2.  The return value is 0
719     if both are the same (including infinity), positive if the absolute
720     value of OP1 is greater than that of OP2, and negative if it is
721     smaller.  If OP1 or OP2 has a real or imaginary part which is NaN,
722     the function behaves like 'mpfr_cmp' on two real numbers of which
723     at least one is NaN.
724
725
726File: mpc.info,  Node: Projection & Decomposing,  Next: Basic Arithmetic,  Prev: Complex Comparison,  Up: Complex Functions
727
7285.6 Projection and Decomposing Functions
729========================================
730
731 -- Function: int mpc_real (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
732     Set ROP to the value of the real part of OP rounded in the
733     direction RND.
734
735 -- Function: int mpc_imag (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
736     Set ROP to the value of the imaginary part of OP rounded in the
737     direction RND.
738
739 -- Macro: mpfr_t mpc_realref (mpc_t OP)
740 -- Macro: mpfr_t mpc_imagref (mpc_t OP)
741     Return a reference to the real part and imaginary part of OP,
742     respectively.  The 'mpfr' functions can be used on the result of
743     these macros (note that the 'mpfr_t' type is itself a pointer).
744
745 -- Function: int mpc_arg (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
746     Set ROP to the argument of OP, with a branch cut along the negative
747     real axis.
748
749 -- Function: int mpc_proj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
750     Compute a projection of OP onto the Riemann sphere.  Set ROP to OP
751     rounded in the direction RND, except when at least one part of OP
752     is infinite (even if the other part is a NaN) in which case the
753     real part of ROP is set to plus infinity and its imaginary part to
754     a signed zero with the same sign as the imaginary part of OP.
755
756
757File: mpc.info,  Node: Basic Arithmetic,  Next: Power Functions and Logarithm,  Prev: Projection & Decomposing,  Up: Complex Functions
758
7595.7 Basic Arithmetic Functions
760==============================
761
762All the following functions are designed in such a way that, when
763working with real numbers instead of complex numbers, their complexity
764should essentially be the same as with the GNU MPFR library, with only a
765marginal overhead due to the GNU MPC layer.
766
767 -- Function: int mpc_add (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
768          RND)
769 -- Function: int mpc_add_ui (mpc_t ROP, mpc_t OP1, unsigned long int
770          OP2, mpc_rnd_t RND)
771 -- Function: int mpc_add_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
772          mpc_rnd_t RND)
773     Set ROP to OP1 + OP2 rounded according to RND.
774
775 -- Function: int mpc_sub (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
776          RND)
777 -- Function: int mpc_sub_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
778          mpc_rnd_t RND)
779 -- Function: int mpc_fr_sub (mpc_t ROP, mpfr_t OP1, mpc_t OP2,
780          mpc_rnd_t RND)
781 -- Function: int mpc_sub_ui (mpc_t ROP, mpc_t OP1, unsigned long int
782          OP2, mpc_rnd_t RND)
783 -- Macro: int mpc_ui_sub (mpc_t ROP, unsigned long int OP1, mpc_t OP2,
784          mpc_rnd_t RND)
785 -- Function: int mpc_ui_ui_sub (mpc_t ROP, unsigned long int RE1,
786          unsigned long int IM1, mpc_t OP2, mpc_rnd_t RND)
787     Set ROP to OP1 - OP2 rounded according to RND.  For
788     'mpc_ui_ui_sub', OP1 is RE1 + IM1.
789
790 -- Function: int mpc_neg (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
791     Set ROP to -OP rounded according to RND.  Just changes the sign if
792     ROP and OP are the same variable.
793
794 -- Function: int mpc_sum (mpc_t ROP, mpc_ptr* OP, unsigned long N,
795          mpc_rnd_t RND)
796     Set ROP to the sum of the elements in the array OP of length N,
797     rounded according to RND.
798
799 -- Function: int mpc_mul (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
800          RND)
801 -- Function: int mpc_mul_ui (mpc_t ROP, mpc_t OP1, unsigned long int
802          OP2, mpc_rnd_t RND)
803 -- Function: int mpc_mul_si (mpc_t ROP, mpc_t OP1, long int OP2,
804          mpc_rnd_t RND)
805 -- Function: int mpc_mul_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
806          mpc_rnd_t RND)
807     Set ROP to OP1 times OP2 rounded according to RND.  Note: for
808     'mpc_mul', in case OP1 and OP2 have the same value, use 'mpc_sqr'
809     for better efficiency.
810
811 -- Function: int mpc_mul_i (mpc_t ROP, mpc_t OP, int SGN, mpc_rnd_t
812          RND)
813     Set ROP to OP times the imaginary unit i if SGN is non-negative,
814     set ROP to OP times -i otherwise, in both cases rounded according
815     to RND.
816
817 -- Function: int mpc_sqr (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
818     Set ROP to the square of OP rounded according to RND.
819
820 -- Function: int mpc_fma (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_t OP3,
821          mpc_rnd_t RND)
822     Set ROP to OP1*OP2+OP3, rounded according to RND, with only one
823     final rounding.
824
825 -- Function: int mpc_dot (mpc_t ROP, mpc_ptr* OP1, mpc_ptr* OP2,
826          unsigned long N, mpc_rnd_t RND)
827     Set ROP to the dot product of the elements in the arrays OP1 and
828     OP2, both of length N, rounded according to RND.
829
830 -- Function: int mpc_div (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
831          RND)
832 -- Function: int mpc_div_ui (mpc_t ROP, mpc_t OP1, unsigned long int
833          OP2, mpc_rnd_t RND)
834 -- Function: int mpc_div_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
835          mpc_rnd_t RND)
836 -- Function: int mpc_ui_div (mpc_t ROP, unsigned long int OP1, mpc_t
837          OP2, mpc_rnd_t RND)
838 -- Function: int mpc_fr_div (mpc_t ROP, mpfr_t OP1, mpc_t OP2,
839          mpc_rnd_t RND)
840     Set ROP to OP1/OP2 rounded according to RND.
841
842 -- Function: int mpc_conj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
843     Set ROP to the conjugate of OP rounded according to RND.  Just
844     changes the sign of the imaginary part if ROP and OP are the same
845     variable.
846
847 -- Function: int mpc_abs (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
848     Set the floating-point number ROP to the absolute value of OP,
849     rounded in the direction RND.
850
851 -- Function: int mpc_norm (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
852     Set the floating-point number ROP to the norm of OP (i.e., the
853     square of its absolute value), rounded in the direction RND.
854
855 -- Function: int mpc_mul_2ui (mpc_t ROP, mpc_t OP1, unsigned long int
856          OP2, mpc_rnd_t RND)
857 -- Function: int mpc_mul_2si (mpc_t ROP, mpc_t OP1, long int OP2,
858          mpc_rnd_t RND)
859     Set ROP to OP1 times 2 raised to OP2 rounded according to RND.
860     Just modifies the exponents of the real and imaginary parts by OP2
861     when ROP and OP1 are identical.
862
863 -- Function: int mpc_div_2ui (mpc_t ROP, mpc_t OP1, unsigned long int
864          OP2, mpc_rnd_t RND)
865 -- Function: int mpc_div_2si (mpc_t ROP, mpc_t OP1, long int OP2,
866          mpc_rnd_t RND)
867     Set ROP to OP1 divided by 2 raised to OP2 rounded according to RND.
868     Just modifies the exponents of the real and imaginary parts by OP2
869     when ROP and OP1 are identical.
870
871
872File: mpc.info,  Node: Power Functions and Logarithm,  Next: Trigonometric Functions,  Prev: Basic Arithmetic,  Up: Complex Functions
873
8745.8 Power Functions and Logarithm
875=================================
876
877 -- Function: int mpc_sqrt (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
878     Set ROP to the square root of OP rounded according to RND.  The
879     returned value ROP has a non-negative real part, and if its real
880     part is zero, a non-negative imaginary part.
881
882 -- Function: int mpc_pow (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
883          RND)
884 -- Function: int mpc_pow_d (mpc_t ROP, mpc_t OP1, double OP2, mpc_rnd_t
885          RND)
886 -- Function: int mpc_pow_ld (mpc_t ROP, mpc_t OP1, long double OP2,
887          mpc_rnd_t RND)
888 -- Function: int mpc_pow_si (mpc_t ROP, mpc_t OP1, long OP2, mpc_rnd_t
889          RND)
890 -- Function: int mpc_pow_ui (mpc_t ROP, mpc_t OP1, unsigned long OP2,
891          mpc_rnd_t RND)
892 -- Function: int mpc_pow_z (mpc_t ROP, mpc_t OP1, mpz_t OP2, mpc_rnd_t
893          RND)
894 -- Function: int mpc_pow_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
895          mpc_rnd_t RND)
896     Set ROP to OP1 raised to the power OP2, rounded according to RND.
897     For 'mpc_pow_d', 'mpc_pow_ld', 'mpc_pow_si', 'mpc_pow_ui',
898     'mpc_pow_z' and 'mpc_pow_fr', the imaginary part of OP2 is
899     considered as +0.  When both OP1 and OP2 are zero, the result has
900     real part 1, and imaginary part 0, with sign being the opposite of
901     that of OP2.
902
903 -- Function: int mpc_exp (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
904     Set ROP to the exponential of OP, rounded according to RND with the
905     precision of ROP.
906
907 -- Function: int mpc_log (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
908 -- Function: int mpc_log10 (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
909     Set ROP to the natural and base-10 logarithm of OP respectively,
910     rounded according to RND with the precision of ROP.  The principal
911     branch is chosen, with the branch cut on the negative real axis, so
912     that the imaginary part of the result lies in ]-Pi , Pi] and
913     ]-Pi/log(10) , Pi/log(10)] respectively.
914
915 -- Function: int mpc_rootofunity (mpc_t ROP, unsigned long int N,
916          unsigned long int K, mpc_rnd_t RND)
917     Set ROP to the standard primitive N-th root of unity raised to the
918     power K, that is, exp (2 Pi i k / n), rounded according to RND with
919     the precision of ROP.
920
921
922File: mpc.info,  Node: Trigonometric Functions,  Next: Miscellaneous Complex Functions,  Prev: Power Functions and Logarithm,  Up: Complex Functions
923
9245.9 Trigonometric Functions
925===========================
926
927 -- Function: int mpc_sin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
928     Set ROP to the sine of OP, rounded according to RND with the
929     precision of ROP.
930
931 -- Function: int mpc_cos (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
932     Set ROP to the cosine of OP, rounded according to RND with the
933     precision of ROP.
934
935 -- Function: int mpc_sin_cos (mpc_t ROP_SIN, mpc_t ROP_COS, mpc_t OP,
936          mpc_rnd_t RND_SIN, mpc_rnd_t RND_COS)
937     Set ROP_SIN to the sine of OP, rounded according to RND_SIN with
938     the precision of ROP_SIN, and ROP_COS to the cosine of OP, rounded
939     according to RND_COS with the precision of ROP_COS.
940
941 -- Function: int mpc_tan (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
942     Set ROP to the tangent of OP, rounded according to RND with the
943     precision of ROP.
944
945 -- Function: int mpc_sinh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
946     Set ROP to the hyperbolic sine of OP, rounded according to RND with
947     the precision of ROP.
948
949 -- Function: int mpc_cosh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
950     Set ROP to the hyperbolic cosine of OP, rounded according to RND
951     with the precision of ROP.
952
953 -- Function: int mpc_tanh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
954     Set ROP to the hyperbolic tangent of OP, rounded according to RND
955     with the precision of ROP.
956
957 -- Function: int mpc_asin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
958 -- Function: int mpc_acos (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
959 -- Function: int mpc_atan (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
960     Set ROP to the inverse sine, inverse cosine, inverse tangent of OP,
961     rounded according to RND with the precision of ROP.
962
963 -- Function: int mpc_asinh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
964 -- Function: int mpc_acosh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
965 -- Function: int mpc_atanh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
966     Set ROP to the inverse hyperbolic sine, inverse hyperbolic cosine,
967     inverse hyperbolic tangent of OP, rounded according to RND with the
968     precision of ROP.  The branch cut of MPC_ACOSH is (-Inf, 1)
969
970
971File: mpc.info,  Node: Miscellaneous Complex Functions,  Next: Advanced Functions,  Prev: Trigonometric Functions,  Up: Complex Functions
972
9735.10 Miscellaneous Functions
974============================
975
976 -- Function: int mpc_urandom (mpc_t ROP, gmp_randstate_t STATE)
977     Generate a uniformly distributed random complex in the unit square
978     [0, 1] x [0, 1].  Return 0, unless an exponent in the real or
979     imaginary part is not in the current exponent range, in which case
980     that part is set to NaN and a zero value is returned.  The second
981     argument is a 'gmp_randstate_t' structure which should be created
982     using the GMP 'rand_init' function, see the GMP manual.
983
984 -- Function: const char * mpc_get_version (void)
985     Return the GNU MPC version, as a null-terminated string.
986
987 -- Macro: MPC_VERSION
988 -- Macro: MPC_VERSION_MAJOR
989 -- Macro: MPC_VERSION_MINOR
990 -- Macro: MPC_VERSION_PATCHLEVEL
991 -- Macro: MPC_VERSION_STRING
992     'MPC_VERSION' is the version of GNU MPC as a preprocessing
993     constant.  'MPC_VERSION_MAJOR', 'MPC_VERSION_MINOR' and
994     'MPC_VERSION_PATCHLEVEL' are respectively the major, minor and
995     patch level of GNU MPC version, as preprocessing constants.
996     'MPC_VERSION_STRING' is the version as a string constant, which can
997     be compared to the result of 'mpc_get_version' to check at run time
998     the header file and library used match:
999          if (strcmp (mpc_get_version (), MPC_VERSION_STRING))
1000            fprintf (stderr, "Warning: header and library do not match\n");
1001     Note: Obtaining different strings is not necessarily an error, as
1002     in general, a program compiled with some old GNU MPC version can be
1003     dynamically linked with a newer GNU MPC library version (if allowed
1004     by the library versioning system).
1005
1006 -- Macro: long MPC_VERSION_NUM (MAJOR, MINOR, PATCHLEVEL)
1007     Create an integer in the same format as used by 'MPC_VERSION' from
1008     the given MAJOR, MINOR and PATCHLEVEL.  Here is an example of how
1009     to check the GNU MPC version at compile time:
1010          #if (!defined(MPC_VERSION) || (MPC_VERSION<MPC_VERSION_NUM(2,1,0)))
1011          # error "Wrong GNU MPC version."
1012          #endif
1013
1014
1015File: mpc.info,  Node: Advanced Functions,  Next: Internals,  Prev: Miscellaneous Complex Functions,  Up: Complex Functions
1016
10175.11 Advanced Functions
1018=======================
1019
1020 -- Macro: MPC_SET_X_Y (REAL_SUFFIX, IMAG_SUFFIX, ROP, REAL, IMAG, RND)
1021     The macro MPC_SET_X_Y is designed to serve as the body of an
1022     assignment function and cannot be used by itself.  The REAL_SUFFIX
1023     and IMAG_SUFFIX parameters are the types of the real and imaginary
1024     part, that is, the 'x' in the 'mpfr_set_x' function one would use
1025     to set the part; for the mpfr type, use 'fr'.  REAL (respectively
1026     IMAG) is the value you want to assign to the real (resp.
1027     imaginary) part, its type must conform to REAL_SUFFIX (resp.
1028     IMAG_SUFFIX).  RND is the 'mpc_rnd_t' rounding mode.  The return
1029     value is the usual inexact value (*note Return Value:
1030     return-value.).
1031
1032     For instance, you can define mpc_set_ui_fr as follows:
1033          int mpc_set_ui_fr (mpc_t rop, long int re, double im, mpc_rnd_t rnd)
1034              MPC_SET_X_Y (ui, fr, rop, re, im, rnd);
1035
1036
1037File: mpc.info,  Node: Internals,  Prev: Advanced Functions,  Up: Complex Functions
1038
10395.12 Internals
1040==============
1041
1042These macros and functions are mainly designed for the implementation of
1043GNU MPC, but may be useful for users too.  However, no upward
1044compatibility is guaranteed.  You need to include 'mpc-impl.h' to use
1045them.
1046
1047   The macro 'MPC_MAX_PREC(z)' gives the maximum of the precisions of
1048the real and imaginary parts of a complex number.
1049
1050
1051File: mpc.info,  Node: References,  Next: Concept Index,  Prev: Complex Functions,  Up: Top
1052
1053References
1054**********
1055
1056   * Torbj��rn Granlund et al.  'gmp' - GNU multiprecision library.
1057     Version 4.2.4, <http://gmplib.org/>.
1058
1059   * Guillaume Hanrot, Vincent Lef��vre, Patrick P��lissier, Paul
1060     Zimmermann et al.  'mpfr' - A library for multiple-precision
1061     floating-point computations with exact rounding.  Version 2.4.1,
1062     <http://www.mpfr.org>.
1063
1064   * IEEE standard for binary floating-point arithmetic, Technical
1065     Report ANSI-IEEE Standard 754-1985, New York, 1985.  Approved March
1066     21, 1985: IEEE Standards Board; approved July 26, 1985: American
1067     National Standards Institute, 18 pages.
1068
1069   * Donald E. Knuth, "The Art of Computer Programming", vol 2,
1070     "Seminumerical Algorithms", 2nd edition, Addison-Wesley, 1981.
1071
1072   * ISO/IEC 9899:1999, Programming languages ��� C.
1073
1074
1075File: mpc.info,  Node: Concept Index,  Next: Function Index,  Prev: References,  Up: Top
1076
1077Concept Index
1078*************
1079
1080[index]
1081* Menu:
1082
1083* Arithmetic functions:                  Basic Arithmetic.     (line  6)
1084* Comparison functions:                  Complex Comparison.   (line  6)
1085* Complex arithmetic functions:          Basic Arithmetic.     (line  6)
1086* Complex assignment functions:          Assigning Complex Numbers.
1087                                                               (line  6)
1088* Complex comparisons functions:         Complex Comparison.   (line  6)
1089* Complex functions:                     Complex Functions.    (line  6)
1090* Complex number:                        GNU MPC Basics.       (line 15)
1091* Conditions for copying GNU MPC:        Copying.              (line  6)
1092* Conversion functions:                  Converting Complex Numbers.
1093                                                               (line  6)
1094* Copying conditions:                    Copying.              (line  6)
1095* Installation:                          Installing GNU MPC.   (line  6)
1096* Logarithm:                             Power Functions and Logarithm.
1097                                                               (line  6)
1098* Miscellaneous complex functions:       Miscellaneous Complex Functions.
1099                                                               (line  6)
1100* mpc.h:                                 GNU MPC Basics.       (line  6)
1101* Power functions:                       Power Functions and Logarithm.
1102                                                               (line  6)
1103* Precision:                             GNU MPC Basics.       (line 19)
1104* Projection and Decomposing Functions:  Projection & Decomposing.
1105                                                               (line  6)
1106* Reporting bugs:                        Reporting Bugs.       (line  6)
1107* Rounding Mode:                         GNU MPC Basics.       (line 24)
1108* String and stream input and output:    String and Stream Input and Output.
1109                                                               (line  6)
1110* Trigonometric functions:               Trigonometric Functions.
1111                                                               (line  6)
1112* User-defined precision:                Complex Functions.    (line 12)
1113
1114
1115File: mpc.info,  Node: Function Index,  Next: GNU Free Documentation License,  Prev: Concept Index,  Up: Top
1116
1117Function Index
1118**************
1119
1120[index]
1121* Menu:
1122
1123* _Complex:                              Converting Complex Numbers.
1124                                                              (line   9)
1125* mpc_abs:                               Basic Arithmetic.    (line  91)
1126* mpc_acos:                              Trigonometric Functions.
1127                                                              (line  37)
1128* mpc_acosh:                             Trigonometric Functions.
1129                                                              (line  43)
1130* mpc_add:                               Basic Arithmetic.    (line  11)
1131* mpc_add_fr:                            Basic Arithmetic.    (line  15)
1132* mpc_add_ui:                            Basic Arithmetic.    (line  13)
1133* mpc_arg:                               Projection & Decomposing.
1134                                                              (line  20)
1135* mpc_asin:                              Trigonometric Functions.
1136                                                              (line  36)
1137* mpc_asinh:                             Trigonometric Functions.
1138                                                              (line  42)
1139* mpc_atan:                              Trigonometric Functions.
1140                                                              (line  38)
1141* mpc_atanh:                             Trigonometric Functions.
1142                                                              (line  44)
1143* mpc_clear:                             Initializing Complex Numbers.
1144                                                              (line  21)
1145* mpc_cmp:                               Complex Comparison.  (line   6)
1146* mpc_cmp_abs:                           Complex Comparison.  (line  23)
1147* mpc_cmp_si:                            Complex Comparison.  (line   9)
1148* mpc_cmp_si_si:                         Complex Comparison.  (line   7)
1149* mpc_conj:                              Basic Arithmetic.    (line  86)
1150* mpc_cos:                               Trigonometric Functions.
1151                                                              (line  10)
1152* mpc_cosh:                              Trigonometric Functions.
1153                                                              (line  28)
1154* mpc_div:                               Basic Arithmetic.    (line  74)
1155* mpc_div_2si:                           Basic Arithmetic.    (line 109)
1156* mpc_div_2ui:                           Basic Arithmetic.    (line 107)
1157* mpc_div_fr:                            Basic Arithmetic.    (line  78)
1158* mpc_div_ui:                            Basic Arithmetic.    (line  76)
1159* mpc_dot:                               Basic Arithmetic.    (line  69)
1160* mpc_exp:                               Power Functions and Logarithm.
1161                                                              (line  32)
1162* mpc_fma:                               Basic Arithmetic.    (line  64)
1163* mpc_free_str:                          String and Stream Input and Output.
1164                                                              (line  66)
1165* mpc_fr_div:                            Basic Arithmetic.    (line  82)
1166* mpc_fr_sub:                            Basic Arithmetic.    (line  23)
1167* mpc_get_ldc:                           Converting Complex Numbers.
1168                                                              (line  10)
1169* mpc_get_prec:                          Initializing Complex Numbers.
1170                                                              (line  49)
1171* mpc_get_prec2:                         Initializing Complex Numbers.
1172                                                              (line  53)
1173* mpc_get_str:                           String and Stream Input and Output.
1174                                                              (line  48)
1175* mpc_get_version:                       Miscellaneous Complex Functions.
1176                                                              (line  14)
1177* mpc_imag:                              Projection & Decomposing.
1178                                                              (line  10)
1179* mpc_imagref:                           Projection & Decomposing.
1180                                                              (line  15)
1181* mpc_init2:                             Initializing Complex Numbers.
1182                                                              (line  10)
1183* mpc_init3:                             Initializing Complex Numbers.
1184                                                              (line  15)
1185* mpc_inp_str:                           String and Stream Input and Output.
1186                                                              (line  74)
1187* mpc_log:                               Power Functions and Logarithm.
1188                                                              (line  36)
1189* mpc_log10:                             Power Functions and Logarithm.
1190                                                              (line  37)
1191* mpc_mul:                               Basic Arithmetic.    (line  43)
1192* mpc_mul_2si:                           Basic Arithmetic.    (line 101)
1193* mpc_mul_2ui:                           Basic Arithmetic.    (line  99)
1194* mpc_mul_fr:                            Basic Arithmetic.    (line  49)
1195* mpc_mul_i:                             Basic Arithmetic.    (line  55)
1196* mpc_mul_si:                            Basic Arithmetic.    (line  47)
1197* mpc_mul_ui:                            Basic Arithmetic.    (line  45)
1198* mpc_neg:                               Basic Arithmetic.    (line  34)
1199* mpc_norm:                              Basic Arithmetic.    (line  95)
1200* mpc_out_str:                           String and Stream Input and Output.
1201                                                              (line 109)
1202* mpc_pow:                               Power Functions and Logarithm.
1203                                                              (line  11)
1204* mpc_pow_d:                             Power Functions and Logarithm.
1205                                                              (line  13)
1206* mpc_pow_fr:                            Power Functions and Logarithm.
1207                                                              (line  23)
1208* mpc_pow_ld:                            Power Functions and Logarithm.
1209                                                              (line  15)
1210* mpc_pow_si:                            Power Functions and Logarithm.
1211                                                              (line  17)
1212* mpc_pow_ui:                            Power Functions and Logarithm.
1213                                                              (line  19)
1214* mpc_pow_z:                             Power Functions and Logarithm.
1215                                                              (line  21)
1216* mpc_proj:                              Projection & Decomposing.
1217                                                              (line  24)
1218* mpc_real:                              Projection & Decomposing.
1219                                                              (line   6)
1220* mpc_realref:                           Projection & Decomposing.
1221                                                              (line  14)
1222* mpc_rnd_t:                             GNU MPC Basics.      (line  24)
1223* mpc_rootofunity:                       Power Functions and Logarithm.
1224                                                              (line  44)
1225* mpc_set:                               Assigning Complex Numbers.
1226                                                              (line  16)
1227* mpc_set_d:                             Assigning Complex Numbers.
1228                                                              (line  25)
1229* mpc_set_dc:                            Assigning Complex Numbers.
1230                                                              (line  27)
1231* mpc_set_d_d:                           Assigning Complex Numbers.
1232                                                              (line  54)
1233* mpc_set_f:                             Assigning Complex Numbers.
1234                                                              (line  33)
1235* mpc_set_fr:                            Assigning Complex Numbers.
1236                                                              (line  34)
1237* mpc_set_fr_fr:                         Assigning Complex Numbers.
1238                                                              (line  64)
1239* mpc_set_f_f:                           Assigning Complex Numbers.
1240                                                              (line  62)
1241* mpc_set_ld:                            Assigning Complex Numbers.
1242                                                              (line  26)
1243* mpc_set_ldc:                           Assigning Complex Numbers.
1244                                                              (line  29)
1245* mpc_set_ld_ld:                         Assigning Complex Numbers.
1246                                                              (line  56)
1247* mpc_set_nan:                           Assigning Complex Numbers.
1248                                                              (line  79)
1249* mpc_set_prec:                          Initializing Complex Numbers.
1250                                                              (line  41)
1251* mpc_set_q:                             Assigning Complex Numbers.
1252                                                              (line  32)
1253* mpc_set_q_q:                           Assigning Complex Numbers.
1254                                                              (line  60)
1255* mpc_set_si:                            Assigning Complex Numbers.
1256                                                              (line  22)
1257* mpc_set_si_si:                         Assigning Complex Numbers.
1258                                                              (line  48)
1259* mpc_set_sj:                            Assigning Complex Numbers.
1260                                                              (line  24)
1261* mpc_set_sj_sj:                         Assigning Complex Numbers.
1262                                                              (line  52)
1263* mpc_set_str:                           String and Stream Input and Output.
1264                                                              (line  35)
1265* mpc_set_ui:                            Assigning Complex Numbers.
1266                                                              (line  20)
1267* mpc_set_ui_ui:                         Assigning Complex Numbers.
1268                                                              (line  46)
1269* mpc_set_uj:                            Assigning Complex Numbers.
1270                                                              (line  23)
1271* mpc_set_uj_uj:                         Assigning Complex Numbers.
1272                                                              (line  50)
1273* MPC_SET_X_Y:                           Advanced Functions.  (line   6)
1274* mpc_set_z:                             Assigning Complex Numbers.
1275                                                              (line  31)
1276* mpc_set_z_z:                           Assigning Complex Numbers.
1277                                                              (line  58)
1278* mpc_sin:                               Trigonometric Functions.
1279                                                              (line   6)
1280* mpc_sinh:                              Trigonometric Functions.
1281                                                              (line  24)
1282* mpc_sin_cos:                           Trigonometric Functions.
1283                                                              (line  14)
1284* mpc_sqr:                               Basic Arithmetic.    (line  61)
1285* mpc_sqrt:                              Power Functions and Logarithm.
1286                                                              (line   6)
1287* mpc_strtoc:                            String and Stream Input and Output.
1288                                                              (line   6)
1289* mpc_sub:                               Basic Arithmetic.    (line  19)
1290* mpc_sub_fr:                            Basic Arithmetic.    (line  21)
1291* mpc_sub_ui:                            Basic Arithmetic.    (line  25)
1292* mpc_sum:                               Basic Arithmetic.    (line  38)
1293* mpc_swap:                              Assigning Complex Numbers.
1294                                                              (line  82)
1295* mpc_t:                                 GNU MPC Basics.      (line  15)
1296* mpc_tan:                               Trigonometric Functions.
1297                                                              (line  20)
1298* mpc_tanh:                              Trigonometric Functions.
1299                                                              (line  32)
1300* mpc_ui_div:                            Basic Arithmetic.    (line  80)
1301* mpc_ui_sub:                            Basic Arithmetic.    (line  27)
1302* mpc_ui_ui_sub:                         Basic Arithmetic.    (line  29)
1303* mpc_urandom:                           Miscellaneous Complex Functions.
1304                                                              (line   6)
1305* MPC_VERSION:                           Miscellaneous Complex Functions.
1306                                                              (line  17)
1307* MPC_VERSION_MAJOR:                     Miscellaneous Complex Functions.
1308                                                              (line  18)
1309* MPC_VERSION_MINOR:                     Miscellaneous Complex Functions.
1310                                                              (line  19)
1311* MPC_VERSION_NUM:                       Miscellaneous Complex Functions.
1312                                                              (line  36)
1313* MPC_VERSION_PATCHLEVEL:                Miscellaneous Complex Functions.
1314                                                              (line  20)
1315* MPC_VERSION_STRING:                    Miscellaneous Complex Functions.
1316                                                              (line  21)
1317* mpfr_prec_t:                           GNU MPC Basics.      (line  19)
1318
1319
1320File: mpc.info,  Node: GNU Free Documentation License,  Prev: Function Index,  Up: Top
1321
1322Appendix A GNU Free Documentation License
1323*****************************************
1324
1325                     Version 1.3, 3 November 2008
1326
1327     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
1328     <http://fsf.org/>
1329
1330     Everyone is permitted to copy and distribute verbatim copies
1331     of this license document, but changing it is not allowed.
1332
1333  0. PREAMBLE
1334
1335     The purpose of this License is to make a manual, textbook, or other
1336     functional and useful document "free" in the sense of freedom: to
1337     assure everyone the effective freedom to copy and redistribute it,
1338     with or without modifying it, either commercially or
1339     noncommercially.  Secondarily, this License preserves for the
1340     author and publisher a way to get credit for their work, while not
1341     being considered responsible for modifications made by others.
1342
1343     This License is a kind of "copyleft", which means that derivative
1344     works of the document must themselves be free in the same sense.
1345     It complements the GNU General Public License, which is a copyleft
1346     license designed for free software.
1347
1348     We have designed this License in order to use it for manuals for
1349     free software, because free software needs free documentation: a
1350     free program should come with manuals providing the same freedoms
1351     that the software does.  But this License is not limited to
1352     software manuals; it can be used for any textual work, regardless
1353     of subject matter or whether it is published as a printed book.  We
1354     recommend this License principally for works whose purpose is
1355     instruction or reference.
1356
1357  1. APPLICABILITY AND DEFINITIONS
1358
1359     This License applies to any manual or other work, in any medium,
1360     that contains a notice placed by the copyright holder saying it can
1361     be distributed under the terms of this License.  Such a notice
1362     grants a world-wide, royalty-free license, unlimited in duration,
1363     to use that work under the conditions stated herein.  The
1364     "Document", below, refers to any such manual or work.  Any member
1365     of the public is a licensee, and is addressed as "you".  You accept
1366     the license if you copy, modify or distribute the work in a way
1367     requiring permission under copyright law.
1368
1369     A "Modified Version" of the Document means any work containing the
1370     Document or a portion of it, either copied verbatim, or with
1371     modifications and/or translated into another language.
1372
1373     A "Secondary Section" is a named appendix or a front-matter section
1374     of the Document that deals exclusively with the relationship of the
1375     publishers or authors of the Document to the Document's overall
1376     subject (or to related matters) and contains nothing that could
1377     fall directly within that overall subject.  (Thus, if the Document
1378     is in part a textbook of mathematics, a Secondary Section may not
1379     explain any mathematics.)  The relationship could be a matter of
1380     historical connection with the subject or with related matters, or
1381     of legal, commercial, philosophical, ethical or political position
1382     regarding them.
1383
1384     The "Invariant Sections" are certain Secondary Sections whose
1385     titles are designated, as being those of Invariant Sections, in the
1386     notice that says that the Document is released under this License.
1387     If a section does not fit the above definition of Secondary then it
1388     is not allowed to be designated as Invariant.  The Document may
1389     contain zero Invariant Sections.  If the Document does not identify
1390     any Invariant Sections then there are none.
1391
1392     The "Cover Texts" are certain short passages of text that are
1393     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
1394     that says that the Document is released under this License.  A
1395     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
1396     be at most 25 words.
1397
1398     A "Transparent" copy of the Document means a machine-readable copy,
1399     represented in a format whose specification is available to the
1400     general public, that is suitable for revising the document
1401     straightforwardly with generic text editors or (for images composed
1402     of pixels) generic paint programs or (for drawings) some widely
1403     available drawing editor, and that is suitable for input to text
1404     formatters or for automatic translation to a variety of formats
1405     suitable for input to text formatters.  A copy made in an otherwise
1406     Transparent file format whose markup, or absence of markup, has
1407     been arranged to thwart or discourage subsequent modification by
1408     readers is not Transparent.  An image format is not Transparent if
1409     used for any substantial amount of text.  A copy that is not
1410     "Transparent" is called "Opaque".
1411
1412     Examples of suitable formats for Transparent copies include plain
1413     ASCII without markup, Texinfo input format, LaTeX input format,
1414     SGML or XML using a publicly available DTD, and standard-conforming
1415     simple HTML, PostScript or PDF designed for human modification.
1416     Examples of transparent image formats include PNG, XCF and JPG.
1417     Opaque formats include proprietary formats that can be read and
1418     edited only by proprietary word processors, SGML or XML for which
1419     the DTD and/or processing tools are not generally available, and
1420     the machine-generated HTML, PostScript or PDF produced by some word
1421     processors for output purposes only.
1422
1423     The "Title Page" means, for a printed book, the title page itself,
1424     plus such following pages as are needed to hold, legibly, the
1425     material this License requires to appear in the title page.  For
1426     works in formats which do not have any title page as such, "Title
1427     Page" means the text near the most prominent appearance of the
1428     work's title, preceding the beginning of the body of the text.
1429
1430     The "publisher" means any person or entity that distributes copies
1431     of the Document to the public.
1432
1433     A section "Entitled XYZ" means a named subunit of the Document
1434     whose title either is precisely XYZ or contains XYZ in parentheses
1435     following text that translates XYZ in another language.  (Here XYZ
1436     stands for a specific section name mentioned below, such as
1437     "Acknowledgements", "Dedications", "Endorsements", or "History".)
1438     To "Preserve the Title" of such a section when you modify the
1439     Document means that it remains a section "Entitled XYZ" according
1440     to this definition.
1441
1442     The Document may include Warranty Disclaimers next to the notice
1443     which states that this License applies to the Document.  These
1444     Warranty Disclaimers are considered to be included by reference in
1445     this License, but only as regards disclaiming warranties: any other
1446     implication that these Warranty Disclaimers may have is void and
1447     has no effect on the meaning of this License.
1448
1449  2. VERBATIM COPYING
1450
1451     You may copy and distribute the Document in any medium, either
1452     commercially or noncommercially, provided that this License, the
1453     copyright notices, and the license notice saying this License
1454     applies to the Document are reproduced in all copies, and that you
1455     add no other conditions whatsoever to those of this License.  You
1456     may not use technical measures to obstruct or control the reading
1457     or further copying of the copies you make or distribute.  However,
1458     you may accept compensation in exchange for copies.  If you
1459     distribute a large enough number of copies you must also follow the
1460     conditions in section 3.
1461
1462     You may also lend copies, under the same conditions stated above,
1463     and you may publicly display copies.
1464
1465  3. COPYING IN QUANTITY
1466
1467     If you publish printed copies (or copies in media that commonly
1468     have printed covers) of the Document, numbering more than 100, and
1469     the Document's license notice requires Cover Texts, you must
1470     enclose the copies in covers that carry, clearly and legibly, all
1471     these Cover Texts: Front-Cover Texts on the front cover, and
1472     Back-Cover Texts on the back cover.  Both covers must also clearly
1473     and legibly identify you as the publisher of these copies.  The
1474     front cover must present the full title with all words of the title
1475     equally prominent and visible.  You may add other material on the
1476     covers in addition.  Copying with changes limited to the covers, as
1477     long as they preserve the title of the Document and satisfy these
1478     conditions, can be treated as verbatim copying in other respects.
1479
1480     If the required texts for either cover are too voluminous to fit
1481     legibly, you should put the first ones listed (as many as fit
1482     reasonably) on the actual cover, and continue the rest onto
1483     adjacent pages.
1484
1485     If you publish or distribute Opaque copies of the Document
1486     numbering more than 100, you must either include a machine-readable
1487     Transparent copy along with each Opaque copy, or state in or with
1488     each Opaque copy a computer-network location from which the general
1489     network-using public has access to download using public-standard
1490     network protocols a complete Transparent copy of the Document, free
1491     of added material.  If you use the latter option, you must take
1492     reasonably prudent steps, when you begin distribution of Opaque
1493     copies in quantity, to ensure that this Transparent copy will
1494     remain thus accessible at the stated location until at least one
1495     year after the last time you distribute an Opaque copy (directly or
1496     through your agents or retailers) of that edition to the public.
1497
1498     It is requested, but not required, that you contact the authors of
1499     the Document well before redistributing any large number of copies,
1500     to give them a chance to provide you with an updated version of the
1501     Document.
1502
1503  4. MODIFICATIONS
1504
1505     You may copy and distribute a Modified Version of the Document
1506     under the conditions of sections 2 and 3 above, provided that you
1507     release the Modified Version under precisely this License, with the
1508     Modified Version filling the role of the Document, thus licensing
1509     distribution and modification of the Modified Version to whoever
1510     possesses a copy of it.  In addition, you must do these things in
1511     the Modified Version:
1512
1513       A. Use in the Title Page (and on the covers, if any) a title
1514          distinct from that of the Document, and from those of previous
1515          versions (which should, if there were any, be listed in the
1516          History section of the Document).  You may use the same title
1517          as a previous version if the original publisher of that
1518          version gives permission.
1519
1520       B. List on the Title Page, as authors, one or more persons or
1521          entities responsible for authorship of the modifications in
1522          the Modified Version, together with at least five of the
1523          principal authors of the Document (all of its principal
1524          authors, if it has fewer than five), unless they release you
1525          from this requirement.
1526
1527       C. State on the Title page the name of the publisher of the
1528          Modified Version, as the publisher.
1529
1530       D. Preserve all the copyright notices of the Document.
1531
1532       E. Add an appropriate copyright notice for your modifications
1533          adjacent to the other copyright notices.
1534
1535       F. Include, immediately after the copyright notices, a license
1536          notice giving the public permission to use the Modified
1537          Version under the terms of this License, in the form shown in
1538          the Addendum below.
1539
1540       G. Preserve in that license notice the full lists of Invariant
1541          Sections and required Cover Texts given in the Document's
1542          license notice.
1543
1544       H. Include an unaltered copy of this License.
1545
1546       I. Preserve the section Entitled "History", Preserve its Title,
1547          and add to it an item stating at least the title, year, new
1548          authors, and publisher of the Modified Version as given on the
1549          Title Page.  If there is no section Entitled "History" in the
1550          Document, create one stating the title, year, authors, and
1551          publisher of the Document as given on its Title Page, then add
1552          an item describing the Modified Version as stated in the
1553          previous sentence.
1554
1555       J. Preserve the network location, if any, given in the Document
1556          for public access to a Transparent copy of the Document, and
1557          likewise the network locations given in the Document for
1558          previous versions it was based on.  These may be placed in the
1559          "History" section.  You may omit a network location for a work
1560          that was published at least four years before the Document
1561          itself, or if the original publisher of the version it refers
1562          to gives permission.
1563
1564       K. For any section Entitled "Acknowledgements" or "Dedications",
1565          Preserve the Title of the section, and preserve in the section
1566          all the substance and tone of each of the contributor
1567          acknowledgements and/or dedications given therein.
1568
1569       L. Preserve all the Invariant Sections of the Document, unaltered
1570          in their text and in their titles.  Section numbers or the
1571          equivalent are not considered part of the section titles.
1572
1573       M. Delete any section Entitled "Endorsements".  Such a section
1574          may not be included in the Modified Version.
1575
1576       N. Do not retitle any existing section to be Entitled
1577          "Endorsements" or to conflict in title with any Invariant
1578          Section.
1579
1580       O. Preserve any Warranty Disclaimers.
1581
1582     If the Modified Version includes new front-matter sections or
1583     appendices that qualify as Secondary Sections and contain no
1584     material copied from the Document, you may at your option designate
1585     some or all of these sections as invariant.  To do this, add their
1586     titles to the list of Invariant Sections in the Modified Version's
1587     license notice.  These titles must be distinct from any other
1588     section titles.
1589
1590     You may add a section Entitled "Endorsements", provided it contains
1591     nothing but endorsements of your Modified Version by various
1592     parties--for example, statements of peer review or that the text
1593     has been approved by an organization as the authoritative
1594     definition of a standard.
1595
1596     You may add a passage of up to five words as a Front-Cover Text,
1597     and a passage of up to 25 words as a Back-Cover Text, to the end of
1598     the list of Cover Texts in the Modified Version.  Only one passage
1599     of Front-Cover Text and one of Back-Cover Text may be added by (or
1600     through arrangements made by) any one entity.  If the Document
1601     already includes a cover text for the same cover, previously added
1602     by you or by arrangement made by the same entity you are acting on
1603     behalf of, you may not add another; but you may replace the old
1604     one, on explicit permission from the previous publisher that added
1605     the old one.
1606
1607     The author(s) and publisher(s) of the Document do not by this
1608     License give permission to use their names for publicity for or to
1609     assert or imply endorsement of any Modified Version.
1610
1611  5. COMBINING DOCUMENTS
1612
1613     You may combine the Document with other documents released under
1614     this License, under the terms defined in section 4 above for
1615     modified versions, provided that you include in the combination all
1616     of the Invariant Sections of all of the original documents,
1617     unmodified, and list them all as Invariant Sections of your
1618     combined work in its license notice, and that you preserve all
1619     their Warranty Disclaimers.
1620
1621     The combined work need only contain one copy of this License, and
1622     multiple identical Invariant Sections may be replaced with a single
1623     copy.  If there are multiple Invariant Sections with the same name
1624     but different contents, make the title of each such section unique
1625     by adding at the end of it, in parentheses, the name of the
1626     original author or publisher of that section if known, or else a
1627     unique number.  Make the same adjustment to the section titles in
1628     the list of Invariant Sections in the license notice of the
1629     combined work.
1630
1631     In the combination, you must combine any sections Entitled
1632     "History" in the various original documents, forming one section
1633     Entitled "History"; likewise combine any sections Entitled
1634     "Acknowledgements", and any sections Entitled "Dedications".  You
1635     must delete all sections Entitled "Endorsements."
1636
1637  6. COLLECTIONS OF DOCUMENTS
1638
1639     You may make a collection consisting of the Document and other
1640     documents released under this License, and replace the individual
1641     copies of this License in the various documents with a single copy
1642     that is included in the collection, provided that you follow the
1643     rules of this License for verbatim copying of each of the documents
1644     in all other respects.
1645
1646     You may extract a single document from such a collection, and
1647     distribute it individually under this License, provided you insert
1648     a copy of this License into the extracted document, and follow this
1649     License in all other respects regarding verbatim copying of that
1650     document.
1651
1652  7. AGGREGATION WITH INDEPENDENT WORKS
1653
1654     A compilation of the Document or its derivatives with other
1655     separate and independent documents or works, in or on a volume of a
1656     storage or distribution medium, is called an "aggregate" if the
1657     copyright resulting from the compilation is not used to limit the
1658     legal rights of the compilation's users beyond what the individual
1659     works permit.  When the Document is included in an aggregate, this
1660     License does not apply to the other works in the aggregate which
1661     are not themselves derivative works of the Document.
1662
1663     If the Cover Text requirement of section 3 is applicable to these
1664     copies of the Document, then if the Document is less than one half
1665     of the entire aggregate, the Document's Cover Texts may be placed
1666     on covers that bracket the Document within the aggregate, or the
1667     electronic equivalent of covers if the Document is in electronic
1668     form.  Otherwise they must appear on printed covers that bracket
1669     the whole aggregate.
1670
1671  8. TRANSLATION
1672
1673     Translation is considered a kind of modification, so you may
1674     distribute translations of the Document under the terms of section
1675     4.  Replacing Invariant Sections with translations requires special
1676     permission from their copyright holders, but you may include
1677     translations of some or all Invariant Sections in addition to the
1678     original versions of these Invariant Sections.  You may include a
1679     translation of this License, and all the license notices in the
1680     Document, and any Warranty Disclaimers, provided that you also
1681     include the original English version of this License and the
1682     original versions of those notices and disclaimers.  In case of a
1683     disagreement between the translation and the original version of
1684     this License or a notice or disclaimer, the original version will
1685     prevail.
1686
1687     If a section in the Document is Entitled "Acknowledgements",
1688     "Dedications", or "History", the requirement (section 4) to
1689     Preserve its Title (section 1) will typically require changing the
1690     actual title.
1691
1692  9. TERMINATION
1693
1694     You may not copy, modify, sublicense, or distribute the Document
1695     except as expressly provided under this License.  Any attempt
1696     otherwise to copy, modify, sublicense, or distribute it is void,
1697     and will automatically terminate your rights under this License.
1698
1699     However, if you cease all violation of this License, then your
1700     license from a particular copyright holder is reinstated (a)
1701     provisionally, unless and until the copyright holder explicitly and
1702     finally terminates your license, and (b) permanently, if the
1703     copyright holder fails to notify you of the violation by some
1704     reasonable means prior to 60 days after the cessation.
1705
1706     Moreover, your license from a particular copyright holder is
1707     reinstated permanently if the copyright holder notifies you of the
1708     violation by some reasonable means, this is the first time you have
1709     received notice of violation of this License (for any work) from
1710     that copyright holder, and you cure the violation prior to 30 days
1711     after your receipt of the notice.
1712
1713     Termination of your rights under this section does not terminate
1714     the licenses of parties who have received copies or rights from you
1715     under this License.  If your rights have been terminated and not
1716     permanently reinstated, receipt of a copy of some or all of the
1717     same material does not give you any rights to use it.
1718
1719  10. FUTURE REVISIONS OF THIS LICENSE
1720
1721     The Free Software Foundation may publish new, revised versions of
1722     the GNU Free Documentation License from time to time.  Such new
1723     versions will be similar in spirit to the present version, but may
1724     differ in detail to address new problems or concerns.  See
1725     <http://www.gnu.org/copyleft/>.
1726
1727     Each version of the License is given a distinguishing version
1728     number.  If the Document specifies that a particular numbered
1729     version of this License "or any later version" applies to it, you
1730     have the option of following the terms and conditions either of
1731     that specified version or of any later version that has been
1732     published (not as a draft) by the Free Software Foundation.  If the
1733     Document does not specify a version number of this License, you may
1734     choose any version ever published (not as a draft) by the Free
1735     Software Foundation.  If the Document specifies that a proxy can
1736     decide which future versions of this License can be used, that
1737     proxy's public statement of acceptance of a version permanently
1738     authorizes you to choose that version for the Document.
1739
1740  11. RELICENSING
1741
1742     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
1743     World Wide Web server that publishes copyrightable works and also
1744     provides prominent facilities for anybody to edit those works.  A
1745     public wiki that anybody can edit is an example of such a server.
1746     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
1747     site means any set of copyrightable works thus published on the MMC
1748     site.
1749
1750     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
1751     license published by Creative Commons Corporation, a not-for-profit
1752     corporation with a principal place of business in San Francisco,
1753     California, as well as future copyleft versions of that license
1754     published by that same organization.
1755
1756     "Incorporate" means to publish or republish a Document, in whole or
1757     in part, as part of another Document.
1758
1759     An MMC is "eligible for relicensing" if it is licensed under this
1760     License, and if all works that were first published under this
1761     License somewhere other than this MMC, and subsequently
1762     incorporated in whole or in part into the MMC, (1) had no cover
1763     texts or invariant sections, and (2) were thus incorporated prior
1764     to November 1, 2008.
1765
1766     The operator of an MMC Site may republish an MMC contained in the
1767     site under CC-BY-SA on the same site at any time before August 1,
1768     2009, provided the MMC is eligible for relicensing.
1769
1770ADDENDUM: How to use this License for your documents
1771====================================================
1772
1773To use this License in a document you have written, include a copy of
1774the License in the document and put the following copyright and license
1775notices just after the title page:
1776
1777       Copyright (C)  YEAR  YOUR NAME.
1778       Permission is granted to copy, distribute and/or modify this document
1779       under the terms of the GNU Free Documentation License, Version 1.3
1780       or any later version published by the Free Software Foundation;
1781       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
1782       Texts.  A copy of the license is included in the section entitled ``GNU
1783       Free Documentation License''.
1784
1785   If you have Invariant Sections, Front-Cover Texts and Back-Cover
1786Texts, replace the "with...Texts."  line with this:
1787
1788         with the Invariant Sections being LIST THEIR TITLES, with
1789         the Front-Cover Texts being LIST, and with the Back-Cover Texts
1790         being LIST.
1791
1792   If you have Invariant Sections without Cover Texts, or some other
1793combination of the three, merge those two alternatives to suit the
1794situation.
1795
1796   If your document contains nontrivial examples of program code, we
1797recommend releasing these examples in parallel under your choice of free
1798software license, such as the GNU General Public License, to permit
1799their use in free software.
1800
1801
1802
1803Tag Table:
1804Node: Top758
1805Node: Copying1465
1806Node: Introduction to GNU MPC2237
1807Node: Installing GNU MPC2956
1808Node: Reporting Bugs8041
1809Node: GNU MPC Basics9385
1810Ref: return-value13062
1811Node: Complex Functions14513
1812Node: Initializing Complex Numbers15673
1813Node: Assigning Complex Numbers18060
1814Node: Converting Complex Numbers22460
1815Node: String and Stream Input and Output23085
1816Node: Complex Comparison29641
1817Node: Projection & Decomposing31154
1818Node: Basic Arithmetic32531
1819Node: Power Functions and Logarithm37531
1820Node: Trigonometric Functions39880
1821Node: Miscellaneous Complex Functions42101
1822Node: Advanced Functions44277
1823Node: Internals45350
1824Node: References45801
1825Node: Concept Index46704
1826Node: Function Index49018
1827Node: GNU Free Documentation License63166
1828
1829End Tag Table
1830
1831
1832Local Variables:
1833coding: utf-8
1834End:
1835