     [file version.texi not included]

     START-INFO-DIR-ENTRY
     * mpc: (mpc.info).               Multiple Precision Complex Library.
     END-INFO-DIR-ENTRY

This is the manual for MPC, a library for multiple precision complex arithmetic, version VERSION, of October 2007.

Copyright (C) 2002, 2003, 2004, 2005, 2007 Andreas Enge, Paul Zimmermann

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.

MPC
***

This manual documents how to install and use the Multiple Precision Complex Library, version VERSION

MPC Copying Conditions
**********************

This library is free; this means that everyone is free to use it and free to redistribute it on a free basis.  The library is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do.  What is not allowed is to try to prevent others from further sharing any version of this library that they might get from you.

Specifically, we want to make sure that you have the right to give away copies of the library, that you receive source code or else can get it if you want it, that you can change this library or use pieces of it in new free programs, and that you know you can do these things.

To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights.  For example, if you distribute copies of the MPC library, you must give the recipients all the rights that you have.  You must make sure that they, too, receive or can get the source code.  And you must tell them their rights.

Also, for our own protection, we must make certain that everyone finds out that there is no warranty for the MPC library.  If it is modified by someone else and passed on, we want their recipients to know that what they have is not what we distributed, so that any problems introduced by others will not reflect on our reputation.

The precise conditions of the license for the MPC library are found in the Lesser General Public License that accompanies the source code. See the file COPYING.LIB.

Introduction to MPC
*******************

MPC is a portable library written in C for arbitrary precision arithmetic on complex numbers. It is based on the GNU MP library.

This version of MPC is released under the GNU Lesser General Public License. It is permitted to link MPC to non-free programs, as long as when distributing them the MPC source code and a means to re-link with a modified MPC is provided.

How to use this Manual
======================

Everyone should read MPC Basics.  If you need to install the library yourself, you need to read Installing MPC, too.

The rest of the manual can be used for later reference, although it is probably a good idea to glance through it.

Installing MPC
**************

To build MPC, you first have to install GNU MP (version 4.2.2 or higher) and MPFR (version 2.2.1 or higher) on your computer.  You need a C compiler, preferably GCC, but any reasonable compiler should work. And you need a standard Unix make program, plus some other standard Unix utility programs.

Here are the steps needed to install the library on Unix systems:

 1. tar xzf mpc-VERSION.tar.gz

 2. cd mpc-VERSION

 3. ./configure

     if GMP and MPFR are installed into standard directories, that is, directories that are searched by default by the compiler and the linking tools.

     ./configure --with-gmp=<gmp_install_dir>

     is used to indicate a different location where GMP is installed.

     ./configure --with-mpfr=<mpfr_install_dir>

     is used to indicate a different location where MPFR is installed.

     ./configure --with-gmp=<gmp_install_dir> --with-mpfr=<mpfr_install_dir>

     is used to indicate different locations of GMP and MPFR.

     Warning! Do not use these options if you have CPPFLAGS and/or LDFLAGS containing a -I or -L option with a directory that contains a GMP header or library file, as these options just add -I and -L options to CPPFLAGS and LDFLAGS after the ones that are currently declared, so that DIR will have a lower precedence. Also, this may not work if DIR is a system directory.

 4. make

     This compiles MPC in the working directory.

 5. make check

     This will make sure MPC was built correctly.

     If you get error messages, please report them to mpc-discuss@lists.gforge.inria.fr (see Reporting Bugs, for information on what to include in useful bug reports).

 6. make install

     This will copy the file mpc.h to the directory /usr/local/include, the file libmpc.a to the directory /usr/local/lib, and the file mpc.info to the directory /usr/local/share/info (or if you passed the --prefix option to configure, using the prefix directory given as argument to --prefix instead of /usr/local). Note: you need write permissions on these directories.

Other `make' Targets
====================

There are some other useful make targets:

  * mpc.info or info

     Create an info version of the manual, in mpc.info.

  * mpc.pdf or pdf

     Create a PDF version of the manual, in mpc.pdf.

  * mpc.dvi or dvi

     Create a DVI version of the manual, in mpc.dvi.

  * mpc.ps or ps

     Create a Postscript version of the manual, in mpc.ps.

  * mpc.html or html

     Create a HTML version of the manual, in several pages in the directory mpc.html; if you want only one output HTML file, then type makeinfo --html --no-split mpc.texi instead.

  * clean

     Delete all object files and archive files, but not the configuration files.

  * distclean

     Delete all files not included in the distribution.

  * uninstall

     Delete all files copied by make install.

Known Build Problems
====================

MPC suffers from all bugs from the GNU MP and MPFR libraries, plus many many more.

Please report other problems to enge@lix.polytechnique.fr,zimmerma@loria.fr.  See Reporting Bugs.

Reporting Bugs
**************

If you think you have found a bug in the MPC library, please investigate and report it. We have made this library available to you, and it is not to ask too much from you, to ask you to report the bugs that you find.

There are a few things you should think about when you put your bug report together.

You have to send us a test case that makes it possible for us to reproduce the bug.  Include instructions on how to run the test case.

You also have to explain what is wrong; if you get a crash, or if the results printed are incorrect and in that case, in what way.

Please include compiler version information in your bug report.  This can be extracted using cc -V on some machines, or, if you are using gcc, gcc -v.  Also, include the output from uname -a.

If your bug report is good, we will do our best to help you to get a corrected version of the library; if the bug report is poor, we will not do anything about it (aside of chiding you to send better bug reports).

Send your bug report to: enge@lix.polytechnique.fr,zimmerma@loria.fr.

If you think something in this manual is unclear, or downright incorrect, or if the language needs to be improved, please send a note to the same address.

MPC Basics
**********

All declarations needed to use MPC are collected in the include file mpc.h.  It is designed to work with both C and C++ compilers. You should include that file in any program using the MPC library by adding the line

        #include "mpc.h"

Nomenclature and Types
======================

Complex number or Complex for short, is a pair of two arbitrary precision floating-point numbers (for the real and imaginary parts). The C data type for such objects is mpc_t.

The Precision is the number of bits used to represent the mantissa of the real and imaginary parts; the corresponding C data type is mp_prec_t. See the MPFR documentation for more details on the allowed precision range.

The rounding mode specifies the way to round the result of a complex operation, in case the exact result can not be represented exactly in the destination mantissa; the corresponding C data type is mpc_rnd_t. A complex rounding mode is a pair of two rounding modes: one for the real part, one for the imaginary part.

Function Classes
================

There is only one class of functions in the MPC library, namely functions for complex arithmetic. The function names begin with mpc_. The associated type is mpc_t.

MPC Variable Conventions
========================

As a general rule, all MPC functions expect output arguments before input arguments.  This notation is based on an analogy with the assignment operator.

MPC allows you to use the same variable for both input and output in the same expression.  For example, the main function for floating-point multiplication, mpc_mul, can be used like this: mpc_mul (x, x, x, rnd_mode). This computes the square of X with rounding mode rnd_mode and puts the result back in X.

Before you can assign to an MPC variable, you need to initialize it by calling one of the special initialization functions.  When you are done with a variable, you need to clear it out, using one of the functions for that purpose.

A variable should only be initialized once, or at least cleared out between each initialization.  After a variable has been initialized, it may be assigned to any number of times.

For efficiency reasons, avoid to initialize and clear out a variable in loops. Instead, initialize it before entering the loop, and clear it out after the loop has exited.

You do not need to be concerned about allocating additional space for MPC variables, since each of its real and imaginary part has a mantissa of fixed size. Hence unless you change its precision, or clear and reinitialize it, a complex variable will have the same allocated space during all its life.

Complex Functions
*****************

The complex functions expect arguments of type mpc_t.

The MPC floating-point functions have an interface that is similar to the GNU MP integer functions.  The function prefix for operations on complex numbers is mpc_.

The precision of a computation is defined as follows: Compute the requested operation exactly (with ``infinite precision''), and round the result to the destination variable precision with the given rounding mode.

The MPC complex functions are intended to be a smooth extension of the IEEE P754 arithmetic. The results obtained on one computer should not differ from the results obtained on a computer with a different word size.

Rounding Modes
==============

A complex rounding mode is of the form MPC_RNDxy where x and y are one of N (to nearest), Z (towards zero), U (towards plus infinity), D (towards minus infinity). The first letter refers to the rounding mode for the real part, and the second one for the imaginary part. For example MPC_RNDZU indicates to round the real part towards zero, and the imaginary part towards plus infinity.

The round to nearest mode works as in the IEEE P754 standard: in case the number to be rounded lies exactly in the middle of two representable numbers, it is rounded to the one with the least significant bit set to zero. For example, the number 5, which is represented by (101) in binary, is rounded to (100)=4 with a precision of two bits, and not to (110)=6.

Most MPC functions have a return value of type int, which is used to indicate the position of the rounded real or imaginary parts with respect to the exact (infinite precision) values. If this integer is i, the macros MPC_INEX_RE(i) and MPC_INEX_IM(i) give 0 if the corresponding rounded value is exact, a negative value if the rounded value is less than the exact one, and a positive value if it is greater than the exact one. However, some functions do not completely fulfill this: in some cases the sign is not guaranteed, and in some cases a non-zero value is returned although the result is exact; in these cases the function documentation explains the exact meaning of the return value. However, the return value never wrongly indicates an exact computation.

Initialization Functions
========================

 -- Function: void mpc_set_default_prec (mp_prec_t PREC)
     Set the default precision to be exactly PREC bits. All subsequent calls to mpc_init will use this precision, but previously initialized variables are unaffected. This default precision is set to 53 bits initially. It is valid for the real and the imaginary parts alike.

 -- Function: mp_prec_t mpc_get_default_prec ()
     Returns the default MPC precision in bits.

An mpc_t object must be initialized before storing the first value in it.  The functions mpc_init, mpc_init2 and mpc_init3 are used for that purpose.

 -- Function: void mpc_init (mpc_t Z)
     Initialize Z, and set its real and imaginary parts to NaN.

     Normally, a variable should be initialized once only or at least be cleared, using mpc_clear, between initializations.  The precision of X is the default precision, which can be changed by a call to mpc_set_default_prec.

 -- Function: void mpc_init2 (mpc_t Z, mp_prec_t PREC)
     Initialize Z, set its precision to be PREC bits, and set its real and imaginary parts to NaN.

 -- Function: void mpc_init3 (mpc_t Z, mp_prec_t PREC_R, mp_prec_t PREC_I)
     Initialize Z, set the precision of its real part to PREC_R bits, the precision of its imaginary part to PREC_I bits, and set its real and imaginary parts to NaN.

 -- Function: void mpc_clear (mpc_t Z)
     Free the space occupied by Z.  Make sure to call this function for all mpc_t variables when you are done with them.

Here is an example on how to initialize complex variables:

     {
       mpc_t x, y, z;
       mpc_init  (x);		/* use default precision */
       mpc_init2 (y, 256);		/* precision exactly 256 bits */
       mpc_init3 (z, 100, 50);	/* 100/50 bits for the real/imaginary part */
       ...
       /* Unless the program is about to exit, do ... */
       mpc_clear (x);
       mpc_clear (y);
       mpc_clear (z);
     }

The following function is useful for changing the precision during a calculation.  A typical use would be for adjusting the precision gradually in iterative algorithms like Newton-Raphson, making the computation precision closely match the actual accurate part of the numbers.

 -- Function: void mpc_set_prec (mpc_t X, mp_prec_t PREC)
     Reset the precision of X to be exactly PREC bits, and set its real/imaginary parts to NaN. The previous value stored in X is lost. It is equivalent to a call to mpc_clear(x) followed by a call to mpc_init2(x, prec), but more efficient as no allocation is done in case the current allocated space for the mantissa of X is sufficient.

 -- Function: mp_prec_t mpc_get_prec (mpc_t X)
     If the real and imaginary part of X have the same precision, it is returned, otherwise, 0 is returned.

 -- Function: void mpc_get_prec2 (mp_prec_t* PR, mp_prec_t* PI, mpc_t X)
     Returns the precision of the real part of X via PR and of its imaginary part via PI.

Assignment Functions
====================

These functions assign new values to already initialized complex numbers (see Initializing Complex Numbers).

 -- Function: int mpc_set (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
 -- Macro: int mpc_set_ui (mpc_t ROP, unsigned long int OP, mpc_rnd_t RND)
 -- Macro: int mpc_set_si (mpc_t ROP, long int OP, mpc_rnd_t RND)
 -- Macro: int mpc_set_d (mpc_t ROP, double OP, mpc_rnd_t RND)
     Set the value of ROP from OP, rounded to the precision of ROP with the given rounding mode RND. Except for mpc_set, the argument OP is interpreted as real, so the imaginary part of ROP is set to zero. Please note that even a long int may have to be rounded, if the destination precision is less than the machine word width. For mpc_set_d, be careful that the input number OP may not be exactly representable as a double-precision number (this happens for 0.1 for instance), in which case it is first rounded by the C compiler to a double-precision number, and then only to a complex number.

 -- Function: int mpc_set_d_d (mpc_t ROP, double OP1, double OP2, mpc_rnd_t RND)
 -- Function: int mpc_set_ui_ui (mpc_t ROP, unsigned long int OP1, unsigned long int OP2, mpc_rnd_t RND)
 -- Function: int mpc_set_si_si (mpc_t ROP, long int OP1, long int OP2, mpc_rnd_t RND)
 -- Function: int mpc_set_ui_fr (mpc_t ROP, unsigned long int OP1, mpfr_t OP2, mpc_rnd_t RND)
     Set the real part of ROP from OP1, and its imaginary part from OP2, according to the rounding mode RND.

Combined Initialization and Assignment Functions
================================================

 -- Macro: int mpc_init_set (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
 -- Macro: int mpc_init_set_ui (mpc_t ROP, unsigned long int OP, mpc_rnd_t RND)
     Initialize ROP and set its value from OP, rounded with the rounding mode RND. The precision of ROP will be taken from the active default precision, as set by mpc_set_default_prec.

 -- Macro: int mpc_init_set_ui_ui (mpc_t ROP, unsigned long int OP1, unsigned long int OP2, mpc_rnd_t RND)
 -- Macro: int mpc_init_set_ui_fr (mpc_t ROP, unsigned long int OP1, mpfr_t OP2, mpc_rnd_t RND)
 -- Macro: int mpc_init_set_si_si (mpc_t ROP, long int OP1, long int OP2, mpc_rnd_t RND)
     Initialize ROP, set its real part from OP1, and its imaginary part from OP2, rounded with the rounding mode RND. The precision of ROP will be taken from the active default precision, as set by mpc_set_default_prec.

Basic Arithmetic Functions
==========================

All the following functions are designed in such a way that, when working with real numbers instead of complex numbers, their complexity should essentially be the same as with the MPFR library, with only a marginal overhead due to the MPC layer.

 -- Function: int mpc_add (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t RND)
 -- Function: int mpc_add_ui (mpc_t ROP, mpc_t OP1, unsigned long int OP2, mpc_rnd_t RND)
 -- Function: int mpc_add_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2, mpc_rnd_t RND)
     Set ROP to OP1 + OP2 rounded according to RND.

 -- Function: int mpc_sub (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t RND)
 -- Function: int mpc_sub_ui (mpc_t ROP, mpc_t OP1, unsigned long int OP2, mpc_rnd_t RND)
 -- Macro: int mpc_ui_sub (mpc_t ROP, unsigned long int OP1, mpc_t OP2, mpc_rnd_t RND)
 -- Function: int mpc_ui_ui_sub (mpc_t ROP, unsigned long int RE1, unsigned long int IM1, mpc_t OP2, mpc_rnd_t RND)
     Set ROP to OP1 - OP2 rounded according to RND. For mpc_ui_ui_sub, OP1 is RE1 + IM1.

 -- Function: int mpc_mul (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t RND)
 -- Function: int mpc_mul_ui (mpc_t ROP, mpc_t OP1, unsigned long int OP2, mpc_rnd_t RND)
 -- Function: int mpc_mul_si (mpc_t ROP, mpc_t OP1, long int OP2, mpc_rnd_t RND)
 -- Function: int mpc_mul_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2, mpc_rnd_t RND)
     Set ROP to OP1 times OP2 rounded according to RND.

 -- Function: int mpc_mul_i (mpc_t ROP, mpc_t OP, int SGN, mpc_rnd_t RND)
     Set ROP to OP times the imaginary unit i if SGN is non-negative, set ROP to OP times -i otherwise, in both cases rounded according to RND.

 -- Function: int mpc_sqr (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
     Set ROP to the square of OP rounded according to RND.

 -- Function: int mpc_div (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t RND)
 -- Function: int mpc_div_ui (mpc_t ROP, mpc_t OP1, unsigned long int OP2, mpc_rnd_t RND)
 -- Function: int mpc_ui_div (mpc_t ROP, unsigned long int OP1, mpc_t OP2, mpc_rnd_t RND)
 -- Function: int mpc_div_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2, mpc_rnd_t RND)
     Set ROP to OP1/OP2 rounded according to RND. For mpc_div and mpc_ui_div, the return value may fail to recognize some exact results, and its sign is not significant.

 -- Function: int mpc_sqrt (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
     Set ROP to the square root of OP rounded according to RND. Here, when the return value is 0, it means the result is exact, but the contrary may be false.

 -- Function: int mpc_neg (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
     Set ROP to -OP rounded according to RND. Just changes the sign if ROP and OP are the same variable.

 -- Function: int mpc_conj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
     Set ROP to the conjugate of OP rounded according to RND. Just changes the sign of the imaginary part if ROP and OP are the same variable.

 -- Function: int mpc_abs (mpfr_t ROP, mpc_t OP, mp_rnd_t RND)
     Set the floating-point number ROP to the absolute value of OP, rounded in the direction RND. The returned value is zero iff the result is exact. Note the destination is of type mpfr_t, not mpc_t.

 -- Function: int mpc_norm (mpfr_t ROP, mpc_t OP, mp_rnd_t RND)
     Set the floating-point number ROP to the norm of OP (i.e. the square of its absolute value), rounded in the direction RND. The returned value is zero iff the result is exact. Note that the destination is of type mpfr_t, not mpc_t.

 -- Function: int mpc_mul_2exp (mpc_t ROP, mpc_t OP1, unsigned long int OP2, mpc_rnd_t RND)
     Set ROP to OP1 times 2 raised to OP2 rounded according to RND. Just increases the exponents of the real and imaginary parts by OP2 when ROP and OP1 are identical.

 -- Function: int mpc_div_2exp (mpc_t ROP, mpc_t OP1, unsigned long int OP2, mpc_rnd_t RND)
     Set ROP to OP1 divided by 2 raised to OP2 rounded according to RND. Just decreases the exponents of the real and imaginary parts by OP2 when ROP and OP1 are identical.

Comparison Functions
====================

 -- Function: int mpc_cmp (mpc_t OP1, mpc_t OP2)
 -- Function: int mpc_cmp_si_si (mpc_t OP1, long int OP2R, long int OP2I)
 -- Macro: int mpc_cmp_si (mpc_t OP1, long int OP2)

     Compare OP1 and OP2, where in the case of mpc_cmp_si_si, OP2 is taken to be OP2R + i OP2I. The return value C can be decomposed into x = MPC_INEX_RE(c) and y = MPC_INEX_IM(c), such that X is positive if the real part of OP1 is greater than that of OP2, zero if both real parts are equal, and negative if the real part of OP1 is less than that of OP2, and likewise for Y. Both OP1 and OP2 are considered to their full own precision, which may differ. It is not allowed that one of the operands has a NaN (Not-a-Number) part.

     The storage of the return value is such that equality can be simply checked with mpc_cmp (op1, op2) == 0.

Special Functions
=================

 -- Function: void mpc_exp (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
     Set ROP to the exponential of OP, rounded according to RND with the precision of ROP.

 -- Function: void mpc_sin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
     Set ROP to the sine of OP, rounded according to RND with the precision of ROP.

Input and Output Functions
==========================

Functions that perform input from a standard input/output stream, and functions that output to a standard input/output stream. Passing a null pointer for a STREAM argument to any of these functions will make them read from stdin and write to stdout, respectively.

When using any of these functions, it is a good idea to include stdio.h before mpc.h, since that will allow mpc.h to define prototypes for these functions.

 -- Function: size_t mpc_out_str (FILE *STREAM, int BASE, size_t N_DIGITS, mpc_t OP, mpc_rnd_t RND)
     Output OP on stdio stream STREAM, in base BASE, rounded according to RND. First the real part is printed, then +I* followed by the imaginary part. The base may vary from 2 to 36.  Print at most N_DIGITS significant digits for each part, or if N_DIGITS is 0, the maximum number of digits accurately representable by OP.

     In addition to the significant digits, a decimal point at the right of the first digit and a trailing exponent, in the form eNNN, are printed.  If BASE is greater than 10, @ will be used instead of e as exponent delimiter.

     Return the number of characters written.

 -- Function: size_t mpc_inp_str (mpc_t ROP, FILE *STREAM, int BASE, mpc_rnd_t RND)
     Input a string in base BASE from stdio stream STREAM, rounded according to RND, and put the read complex in ROP. Each of the real and imaginary part should be of the form M@N or, if the base is 10 or less, alternatively MeN or MEN. M is the mantissa and N is the exponent.  The mantissa is always in the specified base.  The exponent is always read in decimal. This function first reads the real part, then + followed by I* and the imaginary part.

     The argument BASE may be in the range 2 to 36.

     Return the number of bytes read, or if an error occurred, return 0.

Miscellaneous Functions
=======================

 -- Function: void mpc_random (mpc_t ROP)
     Generate a random complex, with real and imaginary parts uniformly distributed in the interval -1 < X < 1.

 -- Function: void mpc_random2 (mpc_t ROP, mp_size_t MAX_SIZE, mp_exp_t MAX_EXP)
     Generate a random complex, with real and imaginary part of at most MAX_SIZE limbs, with long strings of zeros and ones in the binary representation. The exponent of the real (resp. imaginary) part is in the interval -EXP to EXP. This function is useful for testing functions and algorithms, since this kind of random numbers have proven to be more likely to trigger corner-case bugs. Negative parts are generated when MAX_SIZE is negative.

Internals
=========

These types and functions were mainly designed for the implementation of MPC, but may be useful for users too. However no upward compatibility is guaranteed. You need to include mpc-impl.h to use them.

The mpc_t type consists of two fields of type mpfr_t, one for the real part, one for the imaginary part. These fields can be accessed through MPC_RE(z) and MPC_IM(z).

Normally the real and imaginary part have the same precision, but the function mpc_init3 enables one to have different precisions, and the user may also use mpfr_set_prec to change their precision. The macro MPC_MAX_PREC(z) gives the maximum of the precisions of the real and imaginary parts.

Contributors
************

The main developers of the MPC library are Andreas Enge and Paul Zimmermann. Patrick Pelissier has cleaned up the code. Marc Helbling contributed the mpc_ui_sub and mpc_ui_ui_sub functions.

References
**********

  * Torbjörn Granlund et al. gmp -- GNU multiprecision library. Version 4.2.1, http://gmplib.org/.

  * Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier, Paul Zimmermann et al. mpfr -- A library for multiple-precision floating-point               computations with exact rounding. Version 2.2.1, http://www.mpfr.org.

  * IEEE standard for binary floating-point arithmetic, Technical Report ANSI-IEEE Standard 754-1985, New York, 1985. Approved March 21, 1985: IEEE Standards Board; approved July 26, 1985: American National Standards Institute, 18 pages.

  * Donald E. Knuth, "The Art of Computer Programming", vol 2, "Seminumerical Algorithms", 2nd edition, Addison-Wesley, 1981.