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