GNU MPFR 3.1.4

Next: , Previous: , Up: (dir)   [Index]

GNU MPFR

This manual documents how to install and use the Multiple Precision Floating-Point Reliable Library, version 3.1.4.

Copyright 1991, 1993-2016 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in GNU Free Documentation License.



Next: , Previous: , Up: Top   [Index]

MPFR Copying Conditions

The GNU MPFR library (or MPFR for short) 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 GNU MPFR 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 GNU MPFR 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 GNU MPFR library are found in the Lesser General Public License that accompanies the source code. See the file COPYING.LESSER.


Next: , Previous: , Up: Top   [Index]

1 Introduction to MPFR

MPFR is a portable library written in C for arbitrary precision arithmetic on floating-point numbers. It is based on the GNU MP library. It aims to provide a class of floating-point numbers with precise semantics. The main characteristics of MPFR, which make it differ from most arbitrary precision floating-point software tools, are:

In particular, with a precision of 53 bits, MPFR is able to exactly reproduce all computations with double-precision machine floating-point numbers (e.g., double type in C, with a C implementation that rigorously follows Annex F of the ISO C99 standard and FP_CONTRACT pragma set to OFF) on the four arithmetic operations and the square root, except the default exponent range is much wider and subnormal numbers are not implemented (but can be emulated).

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

1.1 How to Use This Manual

Everyone should read MPFR Basics. If you need to install the library yourself, you need to read Installing MPFR, too. To use the library you will need to refer to MPFR Interface.

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


Next: , Previous: , Up: Top   [Index]

2 Installing MPFR

The MPFR library is already installed on some GNU/Linux distributions, but the development files necessary to the compilation such as mpfr.h are not always present. To check that MPFR is fully installed on your computer, you can check the presence of the file mpfr.h in /usr/include, or try to compile a small program having #include <mpfr.h> (since mpfr.h may be installed somewhere else). For instance, you can try to compile:

#include <stdio.h>
#include <mpfr.h>
int main (void)
{
  printf ("MPFR library: %-12s\nMPFR header:  %s (based on %d.%d.%d)\n",
          mpfr_get_version (), MPFR_VERSION_STRING, MPFR_VERSION_MAJOR,
          MPFR_VERSION_MINOR, MPFR_VERSION_PATCHLEVEL);
  return 0;
}

with

cc -o version version.c -lmpfr -lgmp

and if you get errors whose first line looks like

version.c:2:19: error: mpfr.h: No such file or directory

then MPFR is probably not installed. Running this program will give you the MPFR version.

If MPFR is not installed on your computer, or if you want to install a different version, please follow the steps below.

2.1 How to Install

Here are the steps needed to install the library on Unix systems (more details are provided in the INSTALL file):

  1. To build MPFR, you first have to install GNU MP (version 4.1 or higher) on your computer. You need a C compiler, preferably GCC, but any reasonable compiler should work. And you need the standard Unix ‘make’ command, plus some other standard Unix utility commands.

    Then, in the MPFR build directory, type the following commands.

  2. ./configure

    This will prepare the build and setup the options according to your system. You can give options to specify the install directories (instead of the default /usr/local), threading support, and so on. See the INSTALL file and/or the output of ‘./configure --help’ for more information, in particular if you get error messages.

  3. make

    This will compile MPFR, and create a library archive file libmpfr.a. On most platforms, a dynamic library will be produced too.

  4. make check

    This will make sure that MPFR was built correctly. If any test fails, information about this failure can be found in the tests/test-suite.log file. If you want the contents of this file to be automatically output in case of failure, you can set the ‘VERBOSE’ environment variable to 1 before running ‘make check’, for instance by typing:

    VERBOSE=1 make check

    In case of failure, you may want to check whether the problem is already known. If not, please report this failure to the MPFR mailing-list ‘mpfr@inria.fr’. For details, See Reporting Bugs.

  5. make install

    This will copy the files mpfr.h and mpf2mpfr.h to the directory /usr/local/include, the library files (libmpfr.a and possibly others) to the directory /usr/local/lib, the file mpfr.info to the directory /usr/local/share/info, and some other documentation files to the directory /usr/local/share/doc/mpfr (or if you passed the ‘--prefix’ option to configure, using the prefix directory given as argument to ‘--prefix’ instead of /usr/local).

2.2 Other ‘make’ Targets

There are some other useful make targets:

2.3 Build Problems

In case of problem, please read the INSTALL file carefully before reporting a bug, in particular section “In case of problem”. Some problems are due to bad configuration on the user side (not specific to MPFR). Problems are also mentioned in the FAQ http://www.mpfr.org/faq.html.

Please report problems to the MPFR mailing-list ‘mpfr@inria.fr’. See Reporting Bugs. Some bug fixes are available on the MPFR 3.1.4 web page http://www.mpfr.org/mpfr-3.1.4/.

2.4 Getting the Latest Version of MPFR

The latest version of MPFR is available from ftp://ftp.gnu.org/gnu/mpfr/ or http://www.mpfr.org/.


Next: , Previous: , Up: Top   [Index]

3 Reporting Bugs

If you think you have found a bug in the MPFR library, first have a look on the MPFR 3.1.4 web page http://www.mpfr.org/mpfr-3.1.4/ and the FAQ http://www.mpfr.org/faq.html: perhaps this bug is already known, in which case you may find there a workaround for it. You might also look in the archives of the MPFR mailing-list: https://sympa.inria.fr/sympa/arc/mpfr. Otherwise, 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, i.e., a small self-content program, using no other library than MPFR. 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 you get 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’re using GCC, ‘gcc -v’. Also, include the output from ‘uname -a’ and the MPFR version (the GMP version may be useful too). If you get a failure while running ‘make’ or ‘make check’, please include the config.log file in your bug report, and in case of test failure, the tests/test-suite.log file too.

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 the MPFR mailing-list ‘mpfr@inria.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.


Next: , Previous: , Up: Top   [Index]

4 MPFR Basics


Next: , Previous: , Up: MPFR Basics   [Index]

4.1 Headers and Libraries

All declarations needed to use MPFR are collected in the include file mpfr.h. It is designed to work with both C and C++ compilers. You should include that file in any program using the MPFR library:

#include <mpfr.h>

Note however that prototypes for MPFR functions with FILE * parameters are provided only if <stdio.h> is included too (before mpfr.h):

#include <stdio.h>
#include <mpfr.h>

Likewise <stdarg.h> (or <varargs.h>) is required for prototypes with va_list parameters, such as mpfr_vprintf.

And for any functions using intmax_t, you must include <stdint.h> or <inttypes.h> before mpfr.h, to allow mpfr.h to define prototypes for these functions. Moreover, users of C++ compilers under some platforms may need to define MPFR_USE_INTMAX_T (and should do it for portability) before mpfr.h has been included; of course, it is possible to do that on the command line, e.g., with -DMPFR_USE_INTMAX_T.

Note: If mpfr.h and/or gmp.h (used by mpfr.h) are included several times (possibly from another header file), <stdio.h> and/or <stdarg.h> (or <varargs.h>) should be included before the first inclusion of mpfr.h or gmp.h. Alternatively, you can define MPFR_USE_FILE (for MPFR I/O functions) and/or MPFR_USE_VA_LIST (for MPFR functions with va_list parameters) anywhere before the last inclusion of mpfr.h. As a consequence, if your file is a public header that includes mpfr.h, you need to use the latter method.

When calling a MPFR macro, it is not allowed to have previously defined a macro with the same name as some keywords (currently do, while and sizeof).

You can avoid the use of MPFR macros encapsulating functions by defining the MPFR_USE_NO_MACRO macro before mpfr.h is included. In general this should not be necessary, but this can be useful when debugging user code: with some macros, the compiler may emit spurious warnings with some warning options, and macros can prevent some prototype checking.

All programs using MPFR must link against both libmpfr and libgmp libraries. On a typical Unix-like system this can be done with ‘-lmpfr -lgmp’ (in that order), for example:

gcc myprogram.c -lmpfr -lgmp

MPFR is built using Libtool and an application can use that to link if desired, see GNU Libtool.

If MPFR has been installed to a non-standard location, then it may be necessary to set up environment variables such as ‘C_INCLUDE_PATH’ and ‘LIBRARY_PATH’, or use ‘-I’ and ‘-L’ compiler options, in order to point to the right directories. For a shared library, it may also be necessary to set up some sort of run-time library path (e.g., ‘LD_LIBRARY_PATH’) on some systems. Please read the INSTALL file for additional information.


Next: , Previous: , Up: MPFR Basics   [Index]

4.2 Nomenclature and Types

A floating-point number, or float for short, is an arbitrary precision significand (also called mantissa) with a limited precision exponent. The C data type for such objects is mpfr_t (internally defined as a one-element array of a structure, and mpfr_ptr is the C data type representing a pointer to this structure). A floating-point number can have three special values: Not-a-Number (NaN) or plus or minus Infinity. NaN represents an uninitialized object, the result of an invalid operation (like 0 divided by 0), or a value that cannot be determined (like +Infinity minus +Infinity). Moreover, like in the IEEE 754 standard, zero is signed, i.e., there are both +0 and -0; the behavior is the same as in the IEEE 754 standard and it is generalized to the other functions supported by MPFR. Unless documented otherwise, the sign bit of a NaN is unspecified.

The precision is the number of bits used to represent the significand of a floating-point number; the corresponding C data type is mpfr_prec_t. The precision can be any integer between MPFR_PREC_MIN and MPFR_PREC_MAX. In the current implementation, MPFR_PREC_MIN is equal to 2.

Warning! MPFR needs to increase the precision internally, in order to provide accurate results (and in particular, correct rounding). Do not attempt to set the precision to any value near MPFR_PREC_MAX, otherwise MPFR will abort due to an assertion failure. Moreover, you may reach some memory limit on your platform, in which case the program may abort, crash or have undefined behavior (depending on your C implementation).

The rounding mode specifies the way to round the result of a floating-point operation, in case the exact result can not be represented exactly in the destination significand; the corresponding C data type is mpfr_rnd_t.


Next: , Previous: , Up: MPFR Basics   [Index]

4.3 MPFR Variable Conventions

Before you can assign to an MPFR variable, you need to initialize it by calling one of the special initialization functions. When you’re 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 MPFR variables, since any variable has a significand of fixed size. Hence unless you change its precision, or clear and reinitialize it, a floating-point variable will have the same allocated space during all its life.

As a general rule, all MPFR functions expect output arguments before input arguments. This notation is based on an analogy with the assignment operator. MPFR 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, mpfr_mul, can be used like this: mpfr_mul (x, x, x, rnd). This computes the square of x with rounding mode rnd and puts the result back in x.


Next: , Previous: , Up: MPFR Basics   [Index]

4.4 Rounding Modes

The following five rounding modes are supported:

The ‘round to nearest’ mode works as in the IEEE 754 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 2.5, which is represented by (10.1) in binary, is rounded to (10.0)=2 with a precision of two bits, and not to (11.0)=3. This rule avoids the drift phenomenon mentioned by Knuth in volume 2 of The Art of Computer Programming (Section 4.2.2).

Most MPFR functions take as first argument the destination variable, as second and following arguments the input variables, as last argument a rounding mode, and have a return value of type int, called the ternary value. The value stored in the destination variable is correctly rounded, i.e., MPFR behaves as if it computed the result with an infinite precision, then rounded it to the precision of this variable. The input variables are regarded as exact (in particular, their precision does not affect the result).

As a consequence, in case of a non-zero real rounded result, the error on the result is less or equal to 1/2 ulp (unit in the last place) of that result in the rounding to nearest mode, and less than 1 ulp of that result in the directed rounding modes (a ulp is the weight of the least significant represented bit of the result after rounding).

Unless documented otherwise, functions returning an int return a ternary value. If the ternary value is zero, it means that the value stored in the destination variable is the exact result of the corresponding mathematical function. If the ternary value is positive (resp. negative), it means the value stored in the destination variable is greater (resp. lower) than the exact result. For example with the MPFR_RNDU rounding mode, the ternary value is usually positive, except when the result is exact, in which case it is zero. In the case of an infinite result, it is considered as inexact when it was obtained by overflow, and exact otherwise. A NaN result (Not-a-Number) always corresponds to an exact return value. The opposite of a returned ternary value is guaranteed to be representable in an int.

Unless documented otherwise, functions returning as result the value 1 (or any other value specified in this manual) for special cases (like acos(0)) yield an overflow or an underflow if that value is not representable in the current exponent range.


Next: , Previous: , Up: MPFR Basics   [Index]

4.5 Floating-Point Values on Special Numbers

This section specifies the floating-point values (of type mpfr_t) returned by MPFR functions (where by “returned” we mean here the modified value of the destination object, which should not be mixed with the ternary return value of type int of those functions). For functions returning several values (like mpfr_sin_cos), the rules apply to each result separately.

Functions can have one or several input arguments. An input point is a mapping from these input arguments to the set of the MPFR numbers. When none of its components are NaN, an input point can also be seen as a tuple in the extended real numbers (the set of the real numbers with both infinities).

When the input point is in the domain of the mathematical function, the result is rounded as described in Section “Rounding Modes” (but see below for the specification of the sign of an exact zero). Otherwise the general rules from this section apply unless stated otherwise in the description of the MPFR function (MPFR Interface).

When the input point is not in the domain of the mathematical function but is in its closure in the extended real numbers and the function can be extended by continuity, the result is the obtained limit. Examples: mpfr_hypot on (+Inf,0) gives +Inf. But mpfr_pow cannot be defined on (1,+Inf) using this rule, as one can find sequences (x_n,y_n) such that x_n goes to 1, y_n goes to +Inf and x_n to the y_n goes to any positive value when n goes to the infinity.

When the input point is in the closure of the domain of the mathematical function and an input argument is +0 (resp. -0), one considers the limit when the corresponding argument approaches 0 from above (resp. below), if possible. If the limit is not defined (e.g., mpfr_sqrt and mpfr_log on -0), the behavior is specified in the description of the MPFR function, but must be consistent with the rule from the above paragraph (e.g., mpfr_log on ±0 gives -Inf).

When the result is equal to 0, its sign is determined by considering the limit as if the input point were not in the domain: If one approaches 0 from above (resp. below), the result is +0 (resp. -0); for example, mpfr_sin on -0 gives -0 and mpfr_acos on 1 gives +0 (in all rounding modes). In the other cases, the sign is specified in the description of the MPFR function; for example mpfr_max on -0 and +0 gives +0.

When the input point is not in the closure of the domain of the function, the result is NaN. Example: mpfr_sqrt on -17 gives NaN.

When an input argument is NaN, the result is NaN, possibly except when a partial function is constant on the finite floating-point numbers; such a case is always explicitly specified in MPFR Interface. Example: mpfr_hypot on (NaN,0) gives NaN, but mpfr_hypot on (NaN,+Inf) gives +Inf (as specified in Special Functions), since for any finite or infinite input x, mpfr_hypot on (x,+Inf) gives +Inf.


Next: , Previous: , Up: MPFR Basics   [Index]

4.6 Exceptions

MPFR supports 6 exception types:

MPFR has a global flag for each exception, which can be cleared, set or tested by functions described in Exception Related Functions.

Differences with the ISO C99 standard:


Previous: , Up: MPFR Basics   [Index]

4.7 Memory Handling

MPFR functions may create caches, e.g., when computing constants such as Pi, either because the user has called a function like mpfr_const_pi directly or because such a function was called internally by the MPFR library itself to compute some other function.

At any time, the user can free the various caches with mpfr_free_cache. It is strongly advised to do that before terminating a thread, or before exiting when using tools like ‘valgrind’ (to avoid memory leaks being reported).

MPFR internal data such as flags, the exponent range, the default precision and rounding mode, and caches (i.e., data that are not accessed via parameters) are either global (if MPFR has not been compiled as thread safe) or per-thread (thread local storage, TLS). The initial values of TLS data after a thread is created entirely depend on the compiler and thread implementation (MPFR simply does a conventional variable initialization, the variables being declared with an implementation-defined TLS specifier).


Next: , Previous: , Up: Top   [Index]

5 MPFR Interface

The floating-point functions expect arguments of type mpfr_t.

The MPFR floating-point functions have an interface that is similar to the GNU MP functions. The function prefix for floating-point operations is mpfr_.

The user has to specify the precision of each variable. A computation that assigns a variable will take place with the precision of the assigned variable; the cost of that computation should not depend on the precision of variables used as input (on average).

The semantics of a calculation in MPFR is specified as follows: Compute the requested operation exactly (with “infinite accuracy”), and round the result to the precision of the destination variable, with the given rounding mode. The MPFR floating-point functions are intended to be a smooth extension of the IEEE 754 arithmetic. The results obtained on a given computer are identical to those obtained on a computer with a different word size, or with a different compiler or operating system.

MPFR does not keep track of the accuracy of a computation. This is left to the user or to a higher layer (for example the MPFI library for interval arithmetic). As a consequence, if two variables are used to store only a few significant bits, and their product is stored in a variable with large precision, then MPFR will still compute the result with full precision.

The value of the standard C macro errno may be set to non-zero by any MPFR function or macro, whether or not there is an error.


Next: , Previous: , Up: MPFR Interface   [Index]

5.1 Initialization Functions

An mpfr_t object must be initialized before storing the first value in it. The functions mpfr_init and mpfr_init2 are used for that purpose.

Function: void mpfr_init2 (mpfr_t x, mpfr_prec_t prec)

Initialize x, set its precision to be exactly prec bits and its value to NaN. (Warning: the corresponding MPF function initializes to zero instead.)

Normally, a variable should be initialized once only or at least be cleared, using mpfr_clear, between initializations. To change the precision of a variable which has already been initialized, use mpfr_set_prec. The precision prec must be an integer between MPFR_PREC_MIN and MPFR_PREC_MAX (otherwise the behavior is undefined).

Function: void mpfr_inits2 (mpfr_prec_t prec, mpfr_t x, ...)

Initialize all the mpfr_t variables of the given variable argument va_list, set their precision to be exactly prec bits and their value to NaN. See mpfr_init2 for more details. The va_list is assumed to be composed only of type mpfr_t (or equivalently mpfr_ptr). It begins from x, and ends when it encounters a null pointer (whose type must also be mpfr_ptr).

Function: void mpfr_clear (mpfr_t x)

Free the space occupied by the significand of x. Make sure to call this function for all mpfr_t variables when you are done with them.

Function: void mpfr_clears (mpfr_t x, ...)

Free the space occupied by all the mpfr_t variables of the given va_list. See mpfr_clear for more details. The va_list is assumed to be composed only of type mpfr_t (or equivalently mpfr_ptr). It begins from x, and ends when it encounters a null pointer (whose type must also be mpfr_ptr).

Here is an example of how to use multiple initialization functions (since NULL is not necessarily defined in this context, we use (mpfr_ptr) 0 instead, but (mpfr_ptr) NULL is also correct).

{
  mpfr_t x, y, z, t;
  mpfr_inits2 (256, x, y, z, t, (mpfr_ptr) 0);
  …
  mpfr_clears (x, y, z, t, (mpfr_ptr) 0);
}
Function: void mpfr_init (mpfr_t x)

Initialize x, set its precision to the default precision, and set its value to NaN. The default precision can be changed by a call to mpfr_set_default_prec.

Warning! In a given program, some other libraries might change the default precision and not restore it. Thus it is safer to use mpfr_init2.

Function: void mpfr_inits (mpfr_t x, ...)

Initialize all the mpfr_t variables of the given va_list, set their precision to the default precision and their value to NaN. See mpfr_init for more details. The va_list is assumed to be composed only of type mpfr_t (or equivalently mpfr_ptr). It begins from x, and ends when it encounters a null pointer (whose type must also be mpfr_ptr).

Warning! In a given program, some other libraries might change the default precision and not restore it. Thus it is safer to use mpfr_inits2.

Macro: MPFR_DECL_INIT (name, prec)

This macro declares name as an automatic variable of type mpfr_t, initializes it and sets its precision to be exactly prec bits and its value to NaN. name must be a valid identifier. You must use this macro in the declaration section. This macro is much faster than using mpfr_init2 but has some drawbacks:

Function: void mpfr_set_default_prec (mpfr_prec_t prec)

Set the default precision to be exactly prec bits, where prec can be any integer between MPFR_PREC_MIN and MPFR_PREC_MAX. The precision of a variable means the number of bits used to store its significand. All subsequent calls to mpfr_init or mpfr_inits will use this precision, but previously initialized variables are unaffected. The default precision is set to 53 bits initially.

Note: when MPFR is built with the --enable-thread-safe configure option, the default precision is local to each thread. See Memory Handling, for more information.

Function: mpfr_prec_t mpfr_get_default_prec (void)

Return the current default MPFR precision in bits. See the documentation of mpfr_set_default_prec.

Here is an example on how to initialize floating-point variables:

{
  mpfr_t x, y;
  mpfr_init (x);                /* use default precision */
  mpfr_init2 (y, 256);          /* precision exactly 256 bits */
  …
  /* When the program is about to exit, do ... */
  mpfr_clear (x);
  mpfr_clear (y);
  mpfr_free_cache ();           /* free the cache for constants like pi */
}

The following functions are 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 mpfr_set_prec (mpfr_t x, mpfr_prec_t prec)

Reset the precision of x to be exactly prec bits, and set its value to NaN. The previous value stored in x is lost. It is equivalent to a call to mpfr_clear(x) followed by a call to mpfr_init2(x, prec), but more efficient as no allocation is done in case the current allocated space for the significand of x is enough. The precision prec can be any integer between MPFR_PREC_MIN and MPFR_PREC_MAX. In case you want to keep the previous value stored in x, use mpfr_prec_round instead.

Warning! You must not use this function if x was initialized with MPFR_DECL_INIT or with mpfr_custom_init_set (see Custom Interface).

Function: mpfr_prec_t mpfr_get_prec (mpfr_t x)

Return the precision of x, i.e., the number of bits used to store its significand.


Next: , Previous: , Up: MPFR Interface   [Index]

5.2 Assignment Functions

These functions assign new values to already initialized floats (see Initialization Functions).

Function: int mpfr_set (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_set_ui (mpfr_t rop, unsigned long int op, mpfr_rnd_t rnd)
Function: int mpfr_set_si (mpfr_t rop, long int op, mpfr_rnd_t rnd)
Function: int mpfr_set_uj (mpfr_t rop, uintmax_t op, mpfr_rnd_t rnd)
Function: int mpfr_set_sj (mpfr_t rop, intmax_t op, mpfr_rnd_t rnd)
Function: int mpfr_set_flt (mpfr_t rop, float op, mpfr_rnd_t rnd)
Function: int mpfr_set_d (mpfr_t rop, double op, mpfr_rnd_t rnd)
Function: int mpfr_set_ld (mpfr_t rop, long double op, mpfr_rnd_t rnd)
Function: int mpfr_set_decimal64 (mpfr_t rop, _Decimal64 op, mpfr_rnd_t rnd)
Function: int mpfr_set_z (mpfr_t rop, mpz_t op, mpfr_rnd_t rnd)
Function: int mpfr_set_q (mpfr_t rop, mpq_t op, mpfr_rnd_t rnd)
Function: int mpfr_set_f (mpfr_t rop, mpf_t op, mpfr_rnd_t rnd)

Set the value of rop from op, rounded toward the given direction rnd. Note that the input 0 is converted to +0 by mpfr_set_ui, mpfr_set_si, mpfr_set_uj, mpfr_set_sj, mpfr_set_z, mpfr_set_q and mpfr_set_f, regardless of the rounding mode. If the system does not support the IEEE 754 standard, mpfr_set_flt, mpfr_set_d, mpfr_set_ld and mpfr_set_decimal64 might not preserve the signed zeros. The mpfr_set_decimal64 function is built only with the configure option ‘--enable-decimal-float’, which also requires ‘--with-gmp-build’, and when the compiler or system provides the ‘_Decimal64’ data type (recent versions of GCC support this data type); to use mpfr_set_decimal64, one should define the macro MPFR_WANT_DECIMAL_FLOATS before including mpfr.h. mpfr_set_q might fail if the numerator (or the denominator) can not be represented as a mpfr_t.

Note: If you want to store a floating-point constant to a mpfr_t, you should use mpfr_set_str (or one of the MPFR constant functions, such as mpfr_const_pi for Pi) instead of mpfr_set_flt, mpfr_set_d, mpfr_set_ld or mpfr_set_decimal64. Otherwise the floating-point constant will be first converted into a reduced-precision (e.g., 53-bit) binary (or decimal, for mpfr_set_decimal64) number before MPFR can work with it.

Function: int mpfr_set_ui_2exp (mpfr_t rop, unsigned long int op, mpfr_exp_t e, mpfr_rnd_t rnd)
Function: int mpfr_set_si_2exp (mpfr_t rop, long int op, mpfr_exp_t e, mpfr_rnd_t rnd)
Function: int mpfr_set_uj_2exp (mpfr_t rop, uintmax_t op, intmax_t e, mpfr_rnd_t rnd)
Function: int mpfr_set_sj_2exp (mpfr_t rop, intmax_t op, intmax_t e, mpfr_rnd_t rnd)
Function: int mpfr_set_z_2exp (mpfr_t rop, mpz_t op, mpfr_exp_t e, mpfr_rnd_t rnd)

Set the value of rop from op multiplied by two to the power e, rounded toward the given direction rnd. Note that the input 0 is converted to +0.

Function: int mpfr_set_str (mpfr_t rop, const char *s, int base, mpfr_rnd_t rnd)

Set rop to the value of the string s in base base, rounded in the direction rnd. See the documentation of mpfr_strtofr for a detailed description of the valid string formats. Contrary to mpfr_strtofr, mpfr_set_str requires the whole string to represent a valid floating-point number.

The meaning of the return value differs from other MPFR functions: it is 0 if the entire string up to the final null character is a valid number in base base; otherwise it is -1, and rop may have changed (users interested in the ternary value should use mpfr_strtofr instead).

Note: it is preferable to use mpfr_strtofr if one wants to distinguish between an infinite rop value coming from an infinite s or from an overflow.

Function: int mpfr_strtofr (mpfr_t rop, const char *nptr, char **endptr, int base, mpfr_rnd_t rnd)

Read a floating-point number from a string nptr in base base, rounded in the direction rnd; base must be either 0 (to detect the base, as described below) or a number from 2 to 62 (otherwise the behavior is undefined). If nptr starts with valid data, the result is stored in rop and *endptr points to the character just after the valid data (if endptr is not a null pointer); otherwise rop is set to zero (for consistency with strtod) and the value of nptr is stored in the location referenced by endptr (if endptr is not a null pointer). The usual ternary value is returned.

Parsing follows the standard C strtod function with some extensions. After optional leading whitespace, one has a subject sequence consisting of an optional sign (+ or -), and either numeric data or special data. The subject sequence is defined as the longest initial subsequence of the input string, starting with the first non-whitespace character, that is of the expected form.

The form of numeric data is a non-empty sequence of significand digits with an optional decimal point, and an optional exponent consisting of an exponent prefix followed by an optional sign and a non-empty sequence of decimal digits. A significand digit is either a decimal digit or a Latin letter (62 possible characters), with A = 10, B = 11, …, Z = 35; case is ignored in bases less or equal to 36, in bases larger than 36, a = 36, b = 37, …, z = 61. The value of a significand digit must be strictly less than the base. The decimal point can be either the one defined by the current locale or the period (the first one is accepted for consistency with the C standard and the practice, the second one is accepted to allow the programmer to provide MPFR numbers from strings in a way that does not depend on the current locale). The exponent prefix can be e or E for bases up to 10, or @ in any base; it indicates a multiplication by a power of the base. In bases 2 and 16, the exponent prefix can also be p or P, in which case the exponent, called binary exponent, indicates a multiplication by a power of 2 instead of the base (there is a difference only for base 16); in base 16 for example 1p2 represents 4 whereas 1@2 represents 256. The value of an exponent is always written in base 10.

If the argument base is 0, then the base is automatically detected as follows. If the significand starts with 0b or 0B, base 2 is assumed. If the significand starts with 0x or 0X, base 16 is assumed. Otherwise base 10 is assumed.

Note: The exponent (if present) must contain at least a digit. Otherwise the possible exponent prefix and sign are not part of the number (which ends with the significand). Similarly, if 0b, 0B, 0x or 0X is not followed by a binary/hexadecimal digit, then the subject sequence stops at the character 0, thus 0 is read.

Special data (for infinities and NaN) can be @inf@ or @nan@(n-char-sequence-opt), and if base <= 16, it can also be infinity, inf, nan or nan(n-char-sequence-opt), all case insensitive. A n-char-sequence-opt is a possibly empty string containing only digits, Latin letters and the underscore (0, 1, 2, …, 9, a, b, …, z, A, B, …, Z, _). Note: one has an optional sign for all data, even NaN. For example, -@nAn@(This_Is_Not_17) is a valid representation for NaN in base 17.

Function: void mpfr_set_nan (mpfr_t x)
Function: void mpfr_set_inf (mpfr_t x, int sign)
Function: void mpfr_set_zero (mpfr_t x, int sign)

Set the variable x to NaN (Not-a-Number), infinity or zero respectively. In mpfr_set_inf or mpfr_set_zero, x is set to plus infinity or plus zero iff sign is nonnegative; in mpfr_set_nan, the sign bit of the result is unspecified.

Function: void mpfr_swap (mpfr_t x, mpfr_t y)

Swap the structures pointed to by x and y. In particular, the values are exchanged without rounding (this may be different from three mpfr_set calls using a third auxiliary variable).

Warning! Since the precisions are exchanged, this will affect future assignments. Moreover, since the significand pointers are also exchanged, you must not use this function if the allocation method used for x and/or y does not permit it. This is the case when x and/or y were declared and initialized with MPFR_DECL_INIT, and possibly with mpfr_custom_init_set (see Custom Interface).


Next: , Previous: , Up: MPFR Interface   [Index]

5.3 Combined Initialization and Assignment Functions

Macro: int mpfr_init_set (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_ui (mpfr_t rop, unsigned long int op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_si (mpfr_t rop, long int op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_d (mpfr_t rop, double op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_ld (mpfr_t rop, long double op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_z (mpfr_t rop, mpz_t op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_q (mpfr_t rop, mpq_t op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_f (mpfr_t rop, mpf_t op, mpfr_rnd_t rnd)

Initialize rop and set its value from op, rounded in the direction rnd. The precision of rop will be taken from the active default precision, as set by mpfr_set_default_prec.

Function: int mpfr_init_set_str (mpfr_t x, const char *s, int base, mpfr_rnd_t rnd)

Initialize x and set its value from the string s in base base, rounded in the direction rnd. See mpfr_set_str.


Next: , Previous: , Up: MPFR Interface   [Index]

5.4 Conversion Functions

Function: float mpfr_get_flt (mpfr_t op, mpfr_rnd_t rnd)
Function: double mpfr_get_d (mpfr_t op, mpfr_rnd_t rnd)
Function: long double mpfr_get_ld (mpfr_t op, mpfr_rnd_t rnd)
Function: _Decimal64 mpfr_get_decimal64 (mpfr_t op, mpfr_rnd_t rnd)

Convert op to a float (respectively double, long double or _Decimal64), using the rounding mode rnd. If op is NaN, some fixed NaN (either quiet or signaling) or the result of 0.0/0.0 is returned. If op is ±Inf, an infinity of the same sign or the result of ±1.0/0.0 is returned. If op is zero, these functions return a zero, trying to preserve its sign, if possible. The mpfr_get_decimal64 function is built only under some conditions: see the documentation of mpfr_set_decimal64.

Function: long mpfr_get_si (mpfr_t op, mpfr_rnd_t rnd)
Function: unsigned long mpfr_get_ui (mpfr_t op, mpfr_rnd_t rnd)
Function: intmax_t mpfr_get_sj (mpfr_t op, mpfr_rnd_t rnd)
Function: uintmax_t mpfr_get_uj (mpfr_t op, mpfr_rnd_t rnd)

Convert op to a long, an unsigned long, an intmax_t or an uintmax_t (respectively) after rounding it with respect to rnd. If op is NaN, 0 is returned and the erange flag is set. If op is too big for the return type, the function returns the maximum or the minimum of the corresponding C type, depending on the direction of the overflow; the erange flag is set too. See also mpfr_fits_slong_p, mpfr_fits_ulong_p, mpfr_fits_intmax_p and mpfr_fits_uintmax_p.

Function: double mpfr_get_d_2exp (long *exp, mpfr_t op, mpfr_rnd_t rnd)
Function: long double mpfr_get_ld_2exp (long *exp, mpfr_t op, mpfr_rnd_t rnd)

Return d and set exp (formally, the value pointed to by exp) such that 0.5<=abs(d)<1 and d times 2 raised to exp equals op rounded to double (resp. long double) precision, using the given rounding mode. If op is zero, then a zero of the same sign (or an unsigned zero, if the implementation does not have signed zeros) is returned, and exp is set to 0. If op is NaN or an infinity, then the corresponding double precision (resp. long-double precision) value is returned, and exp is undefined.

Function: int mpfr_frexp (mpfr_exp_t *exp, mpfr_t y, mpfr_t x, mpfr_rnd_t rnd)

Set exp (formally, the value pointed to by exp) and y such that 0.5<=abs(y)<1 and y times 2 raised to exp equals x rounded to the precision of y, using the given rounding mode. If x is zero, then y is set to a zero of the same sign and exp is set to 0. If x is NaN or an infinity, then y is set to the same value and exp is undefined.

Function: mpfr_exp_t mpfr_get_z_2exp (mpz_t rop, mpfr_t op)

Put the scaled significand of op (regarded as an integer, with the precision of op) into rop, and return the exponent exp (which may be outside the current exponent range) such that op exactly equals rop times 2 raised to the power exp. If op is zero, the minimal exponent emin is returned. If op is NaN or an infinity, the erange flag is set, rop is set to 0, and the the minimal exponent emin is returned. The returned exponent may be less than the minimal exponent emin of MPFR numbers in the current exponent range; in case the exponent is not representable in the mpfr_exp_t type, the erange flag is set and the minimal value of the mpfr_exp_t type is returned.

Function: int mpfr_get_z (mpz_t rop, mpfr_t op, mpfr_rnd_t rnd)

Convert op to a mpz_t, after rounding it with respect to rnd. If op is NaN or an infinity, the erange flag is set, rop is set to 0, and 0 is returned.

Function: int mpfr_get_f (mpf_t rop, mpfr_t op, mpfr_rnd_t rnd)

Convert op to a mpf_t, after rounding it with respect to rnd. The erange flag is set if op is NaN or an infinity, which do not exist in MPF. If op is NaN, then rop is undefined. If op is +Inf (resp. -Inf), then rop is set to the maximum (resp. minimum) value in the precision of the MPF number; if a future MPF version supports infinities, this behavior will be considered incorrect and will change (portable programs should assume that rop is set either to this finite number or to an infinite number). Note that since MPFR currently has the same exponent type as MPF (but not with the same radix), the range of values is much larger in MPF than in MPFR, so that an overflow or underflow is not possible.

Function: char * mpfr_get_str (char *str, mpfr_exp_t *expptr, int b, size_t n, mpfr_t op, mpfr_rnd_t rnd)

Convert op to a string of digits in base b, with rounding in the direction rnd, where n is either zero (see below) or the number of significant digits output in the string; in the latter case, n must be greater or equal to 2. The base may vary from 2 to 62; otherwise the function does nothing and immediately returns a null pointer. If the input number is an ordinary number, the exponent is written through the pointer expptr (for input 0, the current minimal exponent is written); the type mpfr_exp_t is large enough to hold the exponent in all cases.

The generated string is a fraction, with an implicit radix point immediately to the left of the first digit. For example, the number -3.1416 would be returned as "-31416" in the string and 1 written at expptr. If rnd is to nearest, and op is exactly in the middle of two consecutive possible outputs, the one with an even significand is chosen, where both significands are considered with the exponent of op. Note that for an odd base, this may not correspond to an even last digit: for example with 2 digits in base 7, (14) and a half is rounded to (15) which is 12 in decimal, (16) and a half is rounded to (20) which is 14 in decimal, and (26) and a half is rounded to (26) which is 20 in decimal.

If n is zero, the number of digits of the significand is chosen large enough so that re-reading the printed value with the same precision, assuming both output and input use rounding to nearest, will recover the original value of op. More precisely, in most cases, the chosen precision of str is the minimal precision m depending only on p = PREC(op) and b that satisfies the above property, i.e., m = 1 + ceil(p*log(2)/log(b)), with p replaced by p-1 if b is a power of 2, but in some very rare cases, it might be m+1 (the smallest case for bases up to 62 is when p equals 186564318007 for bases 7 and 49).

If str is a null pointer, space for the significand is allocated using the current allocation function and a pointer to the string is returned (unless the base is invalid). To free the returned string, you must use mpfr_free_str.

If str is not a null pointer, it should point to a block of storage large enough for the significand, i.e., at least max(n + 2, 7). The extra two bytes are for a possible minus sign, and for the terminating null character, and the value 7 accounts for -@Inf@ plus the terminating null character. The pointer to the string str is returned (unless the base is invalid).

Note: The NaN and inexact flags are currently not set when need be; this will be fixed in future versions. Programmers should currently assume that whether the flags are set by this function is unspecified.

Function: void mpfr_free_str (char *str)

Free a string allocated by mpfr_get_str using the current unallocation function. The block is assumed to be strlen(str)+1 bytes. For more information about how it is done: see Section “Custom Allocation” in GNU MP.

Function: int mpfr_fits_ulong_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_slong_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_uint_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_sint_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_ushort_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_sshort_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_uintmax_p (mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_fits_intmax_p (mpfr_t op, mpfr_rnd_t rnd)

Return non-zero if op would fit in the respective C data type, respectively unsigned long, long, unsigned int, int, unsigned short, short, uintmax_t, intmax_t, when rounded to an integer in the direction rnd.


Next: , Previous: , Up: MPFR Interface   [Index]

5.5 Basic Arithmetic Functions

Function: int mpfr_add (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_add_ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_add_si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)
Function: int mpfr_add_d (mpfr_t rop, mpfr_t op1, double op2, mpfr_rnd_t rnd)
Function: int mpfr_add_z (mpfr_t rop, mpfr_t op1, mpz_t op2, mpfr_rnd_t rnd)
Function: int mpfr_add_q (mpfr_t rop, mpfr_t op1, mpq_t op2, mpfr_rnd_t rnd)

Set rop to op1 + op2 rounded in the direction rnd. The IEEE-754 rules are used, in particular for signed zeros. But for types having no signed zeros, 0 is considered unsigned (i.e., (+0) + 0 = (+0) and (-0) + 0 = (-0)). The mpfr_add_d function assumes that the radix of the double type is a power of 2, with a precision at most that declared by the C implementation (macro IEEE_DBL_MANT_DIG, and if not defined 53 bits).

Function: int mpfr_sub (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_ui_sub (mpfr_t rop, unsigned long int op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_sub_ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_si_sub (mpfr_t rop, long int op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_sub_si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)
Function: int mpfr_d_sub (mpfr_t rop, double op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_sub_d (mpfr_t rop, mpfr_t op1, double op2, mpfr_rnd_t rnd)
Function: int mpfr_z_sub (mpfr_t rop, mpz_t op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_sub_z (mpfr_t rop, mpfr_t op1, mpz_t op2, mpfr_rnd_t rnd)
Function: int mpfr_sub_q (mpfr_t rop, mpfr_t op1, mpq_t op2, mpfr_rnd_t rnd)

Set rop to op1 - op2 rounded in the direction rnd. The IEEE-754 rules are used, in particular for signed zeros. But for types having no signed zeros, 0 is considered unsigned (i.e., (+0) - 0 = (+0), (-0) - 0 = (-0), 0 - (+0) = (-0) and 0 - (-0) = (+0)). The same restrictions than for mpfr_add_d apply to mpfr_d_sub and mpfr_sub_d.

Function: int mpfr_mul (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_mul_ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_mul_si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)
Function: int mpfr_mul_d (mpfr_t rop, mpfr_t op1, double op2, mpfr_rnd_t rnd)
Function: int mpfr_mul_z (mpfr_t rop, mpfr_t op1, mpz_t op2, mpfr_rnd_t rnd)
Function: int mpfr_mul_q (mpfr_t rop, mpfr_t op1, mpq_t op2, mpfr_rnd_t rnd)

Set rop to op1 times op2 rounded in the direction rnd. When a result is zero, its sign is the product of the signs of the operands (for types having no signed zeros, 0 is considered positive). The same restrictions than for mpfr_add_d apply to mpfr_mul_d.

Function: int mpfr_sqr (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the square of op rounded in the direction rnd.

Function: int mpfr_div (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_ui_div (mpfr_t rop, unsigned long int op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_div_ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_si_div (mpfr_t rop, long int op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_div_si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)
Function: int mpfr_d_div (mpfr_t rop, double op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_div_d (mpfr_t rop, mpfr_t op1, double op2, mpfr_rnd_t rnd)
Function: int mpfr_div_z (mpfr_t rop, mpfr_t op1, mpz_t op2, mpfr_rnd_t rnd)
Function: int mpfr_div_q (mpfr_t rop, mpfr_t op1, mpq_t op2, mpfr_rnd_t rnd)

Set rop to op1/op2 rounded in the direction rnd. When a result is zero, its sign is the product of the signs of the operands (for types having no signed zeros, 0 is considered positive). The same restrictions than for mpfr_add_d apply to mpfr_d_div and mpfr_div_d.

Function: int mpfr_sqrt (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_sqrt_ui (mpfr_t rop, unsigned long int op, mpfr_rnd_t rnd)

Set rop to the square root of op rounded in the direction rnd. Set rop to -0 if op is -0, to be consistent with the IEEE 754 standard. Set rop to NaN if op is negative.

Function: int mpfr_rec_sqrt (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the reciprocal square root of op rounded in the direction rnd. Set rop to +Inf if op is ±0, +0 if op is +Inf, and NaN if op is negative. Warning! Therefore the result on -0 is different from the one of the rSqrt function recommended by the IEEE 754-2008 standard (Section 9.2.1), which is -Inf instead of +Inf.

Function: int mpfr_cbrt (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_root (mpfr_t rop, mpfr_t op, unsigned long int k, mpfr_rnd_t rnd)

Set rop to the cubic root (resp. the kth root) of op rounded in the direction rnd. For k odd (resp. even) and op negative (including -Inf), set rop to a negative number (resp. NaN). The kth root of -0 is defined to be -0, whatever the parity of k.

Function: int mpfr_pow (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)
Function: int mpfr_pow_ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_pow_si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)
Function: int mpfr_pow_z (mpfr_t rop, mpfr_t op1, mpz_t op2, mpfr_rnd_t rnd)
Function: int mpfr_ui_pow_ui (mpfr_t rop, unsigned long int op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_ui_pow (mpfr_t rop, unsigned long int op1, mpfr_t op2, mpfr_rnd_t rnd)

Set rop to op1 raised to op2, rounded in the direction rnd. Special values are handled as described in the ISO C99 and IEEE 754-2008 standards for the pow function:

Function: int mpfr_neg (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_abs (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to -op and the absolute value of op respectively, rounded in the direction rnd. Just changes or adjusts the sign if rop and op are the same variable, otherwise a rounding might occur if the precision of rop is less than that of op.

Function: int mpfr_dim (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)

Set rop to the positive difference of op1 and op2, i.e., op1 - op2 rounded in the direction rnd if op1 > op2, +0 if op1 <= op2, and NaN if op1 or op2 is NaN.

Function: int mpfr_mul_2ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_mul_2si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)

Set rop to op1 times 2 raised to op2 rounded in the direction rnd. Just increases the exponent by op2 when rop and op1 are identical.

Function: int mpfr_div_2ui (mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
Function: int mpfr_div_2si (mpfr_t rop, mpfr_t op1, long int op2, mpfr_rnd_t rnd)

Set rop to op1 divided by 2 raised to op2 rounded in the direction rnd. Just decreases the exponent by op2 when rop and op1 are identical.


Next: , Previous: , Up: MPFR Interface   [Index]

5.6 Comparison Functions

Function: int mpfr_cmp (mpfr_t op1, mpfr_t op2)
Function: int mpfr_cmp_ui (mpfr_t op1, unsigned long int op2)
Function: int mpfr_cmp_si (mpfr_t op1, long int op2)
Function: int mpfr_cmp_d (mpfr_t op1, double op2)
Function: int mpfr_cmp_ld (mpfr_t op1, long double op2)
Function: int mpfr_cmp_z (mpfr_t op1, mpz_t op2)
Function: int mpfr_cmp_q (mpfr_t op1, mpq_t op2)
Function: int mpfr_cmp_f (mpfr_t op1, mpf_t op2)

Compare op1 and op2. Return a positive value if op1 > op2, zero if op1 = op2, and a negative value if op1 < op2. Both op1 and op2 are considered to their full own precision, which may differ. If one of the operands is NaN, set the erange flag and return zero.

Note: These functions may be useful to distinguish the three possible cases. If you need to distinguish two cases only, it is recommended to use the predicate functions (e.g., mpfr_equal_p for the equality) described below; they behave like the IEEE 754 comparisons, in particular when one or both arguments are NaN. But only floating-point numbers can be compared (you may need to do a conversion first).

Function: int mpfr_cmp_ui_2exp (mpfr_t op1, unsigned long int op2, mpfr_exp_t e)
Function: int mpfr_cmp_si_2exp (mpfr_t op1, long int op2, mpfr_exp_t e)

Compare op1 and op2 multiplied by two to the power e. Similar as above.

Function: int mpfr_cmpabs (mpfr_t op1, mpfr_t op2)

Compare |op1| and |op2|. Return a positive value if |op1| > |op2|, zero if |op1| = |op2|, and a negative value if |op1| < |op2|. If one of the operands is NaN, set the erange flag and return zero.

Function: int mpfr_nan_p (mpfr_t op)
Function: int mpfr_inf_p (mpfr_t op)
Function: int mpfr_number_p (mpfr_t op)
Function: int mpfr_zero_p (mpfr_t op)
Function: int mpfr_regular_p (mpfr_t op)

Return non-zero if op is respectively NaN, an infinity, an ordinary number (i.e., neither NaN nor an infinity), zero, or a regular number (i.e., neither NaN, nor an infinity nor zero). Return zero otherwise.

Macro: int mpfr_sgn (mpfr_t op)

Return a positive value if op > 0, zero if op = 0, and a negative value if op < 0. If the operand is NaN, set the erange flag and return zero. This is equivalent to mpfr_cmp_ui (op, 0), but more efficient.

Function: int mpfr_greater_p (mpfr_t op1, mpfr_t op2)
Function: int mpfr_greaterequal_p (mpfr_t op1, mpfr_t op2)
Function: int mpfr_less_p (mpfr_t op1, mpfr_t op2)
Function: int mpfr_lessequal_p (mpfr_t op1, mpfr_t op2)
Function: int mpfr_equal_p (mpfr_t op1, mpfr_t op2)

Return non-zero if op1 > op2, op1 >= op2, op1 < op2, op1 <= op2, op1 = op2 respectively, and zero otherwise. Those functions return zero whenever op1 and/or op2 is NaN.

Function: int mpfr_lessgreater_p (mpfr_t op1, mpfr_t op2)

Return non-zero if op1 < op2 or op1 > op2 (i.e., neither op1, nor op2 is NaN, and op1 <> op2), zero otherwise (i.e., op1 and/or op2 is NaN, or op1 = op2).

Function: int mpfr_unordered_p (mpfr_t op1, mpfr_t op2)

Return non-zero if op1 or op2 is a NaN (i.e., they cannot be compared), zero otherwise.


Next: , Previous: , Up: MPFR Interface   [Index]

5.7 Special Functions

All those functions, except explicitly stated (for example mpfr_sin_cos), return a ternary value, i.e., zero for an exact return value, a positive value for a return value larger than the exact result, and a negative value otherwise.

Important note: in some domains, computing special functions (either with correct or incorrect rounding) is expensive, even for small precision, for example the trigonometric and Bessel functions for large argument.

Function: int mpfr_log (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_log2 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_log10 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the natural logarithm of op, log2(op) or log10(op), respectively, rounded in the direction rnd. Set rop to +0 if op is 1 (in all rounding modes), for consistency with the ISO C99 and IEEE 754-2008 standards. Set rop to -Inf if op is ±0 (i.e., the sign of the zero has no influence on the result).

Function: int mpfr_exp (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_exp2 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_exp10 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the exponential of op, to 2 power of op or to 10 power of op, respectively, rounded in the direction rnd.

Function: int mpfr_cos (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_sin (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_tan (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the cosine of op, sine of op, tangent of op, rounded in the direction rnd.

Function: int mpfr_sin_cos (mpfr_t sop, mpfr_t cop, mpfr_t op, mpfr_rnd_t rnd)

Set simultaneously sop to the sine of op and cop to the cosine of op, rounded in the direction rnd with the corresponding precisions of sop and cop, which must be different variables. Return 0 iff both results are exact, more precisely it returns s+4c where s=0 if sop is exact, s=1 if sop is larger than the sine of op, s=2 if sop is smaller than the sine of op, and similarly for c and the cosine of op.

Function: int mpfr_sec (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_csc (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_cot (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the secant of op, cosecant of op, cotangent of op, rounded in the direction rnd.

Function: int mpfr_acos (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_asin (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_atan (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the arc-cosine, arc-sine or arc-tangent of op, rounded in the direction rnd. Note that since acos(-1) returns the floating-point number closest to Pi according to the given rounding mode, this number might not be in the output range 0 <= rop < \pi of the arc-cosine function; still, the result lies in the image of the output range by the rounding function. The same holds for asin(-1), asin(1), atan(-Inf), atan(+Inf) or for atan(op) with large op and small precision of rop.

Function: int mpfr_atan2 (mpfr_t rop, mpfr_t y, mpfr_t x, mpfr_rnd_t rnd)

Set rop to the arc-tangent2 of y and x, rounded in the direction rnd: if x > 0, atan2(y, x) = atan (y/x); if x < 0, atan2(y, x) = sign(y)*(Pi - atan (abs(y/x))), thus a number from -Pi to Pi. As for atan, in case the exact mathematical result is +Pi or -Pi, its rounded result might be outside the function output range.

atan2(y, 0) does not raise any floating-point exception. Special values are handled as described in the ISO C99 and IEEE 754-2008 standards for the atan2 function:

Function: int mpfr_cosh (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_sinh (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_tanh (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the hyperbolic cosine, sine or tangent of op, rounded in the direction rnd.

Function: int mpfr_sinh_cosh (mpfr_t sop, mpfr_t cop, mpfr_t op, mpfr_rnd_t rnd)

Set simultaneously sop to the hyperbolic sine of op and cop to the hyperbolic cosine of op, rounded in the direction rnd with the corresponding precision of sop and cop, which must be different variables. Return 0 iff both results are exact (see mpfr_sin_cos for a more detailed description of the return value).

Function: int mpfr_sech (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_csch (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_coth (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the hyperbolic secant of op, cosecant of op, cotangent of op, rounded in the direction rnd.

Function: int mpfr_acosh (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_asinh (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_atanh (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the inverse hyperbolic cosine, sine or tangent of op, rounded in the direction rnd.

Function: int mpfr_fac_ui (mpfr_t rop, unsigned long int op, mpfr_rnd_t rnd)

Set rop to the factorial of op, rounded in the direction rnd.

Function: int mpfr_log1p (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the logarithm of one plus op, rounded in the direction rnd.

Function: int mpfr_expm1 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the exponential of op followed by a subtraction by one, rounded in the direction rnd.

Function: int mpfr_eint (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the exponential integral of op, rounded in the direction rnd. For positive op, the exponential integral is the sum of Euler’s constant, of the logarithm of op, and of the sum for k from 1 to infinity of op to the power k, divided by k and factorial(k). For negative op, rop is set to NaN (this definition for negative argument follows formula 5.1.2 from the Handbook of Mathematical Functions from Abramowitz and Stegun, a future version might use another definition).

Function: int mpfr_li2 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to real part of the dilogarithm of op, rounded in the direction rnd. MPFR defines the dilogarithm function as the integral of -log(1-t)/t from 0 to op.

Function: int mpfr_gamma (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the Gamma function on op, rounded in the direction rnd. When op is a negative integer, rop is set to NaN.

Function: int mpfr_lngamma (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the logarithm of the Gamma function on op, rounded in the direction rnd. When op is 1 or 2, set rop to +0 (in all rounding modes). When op is an infinity or a nonpositive integer, set rop to +Inf, following the general rules on special values. When -2k-1 < op < -2k, k being a nonnegative integer, set rop to NaN. See also mpfr_lgamma.

Function: int mpfr_lgamma (mpfr_t rop, int *signp, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the logarithm of the absolute value of the Gamma function on op, rounded in the direction rnd. The sign (1 or -1) of Gamma(op) is returned in the object pointed to by signp. When op is 1 or 2, set rop to +0 (in all rounding modes). When op is an infinity or a nonpositive integer, set rop to +Inf. When op is NaN, -Inf or a negative integer, *signp is undefined, and when op is ±0, *signp is the sign of the zero.

Function: int mpfr_digamma (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the Digamma (sometimes also called Psi) function on op, rounded in the direction rnd. When op is a negative integer, set rop to NaN.

Function: int mpfr_zeta (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_zeta_ui (mpfr_t rop, unsigned long op, mpfr_rnd_t rnd)

Set rop to the value of the Riemann Zeta function on op, rounded in the direction rnd.

Function: int mpfr_erf (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_erfc (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the error function on op (resp. the complementary error function on op) rounded in the direction rnd.

Function: int mpfr_j0 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_j1 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_jn (mpfr_t rop, long n, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the first kind Bessel function of order 0, (resp. 1 and n) on op, rounded in the direction rnd. When op is NaN, rop is always set to NaN. When op is plus or minus Infinity, rop is set to +0. When op is zero, and n is not zero, rop is set to +0 or -0 depending on the parity and sign of n, and the sign of op.

Function: int mpfr_y0 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_y1 (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_yn (mpfr_t rop, long n, mpfr_t op, mpfr_rnd_t rnd)

Set rop to the value of the second kind Bessel function of order 0 (resp. 1 and n) on op, rounded in the direction rnd. When op is NaN or negative, rop is always set to NaN. When op is +Inf, rop is set to +0. When op is zero, rop is set to +Inf or -Inf depending on the parity and sign of n.

Function: int mpfr_fma (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_t op3, mpfr_rnd_t rnd)
Function: int mpfr_fms (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_t op3, mpfr_rnd_t rnd)

Set rop to (op1 times op2) + op3 (resp. (op1 times op2) - op3) rounded in the direction rnd. Concerning special values (signed zeros, infinities, NaN), these functions behave like a multiplication followed by a separate addition or subtraction. That is, the fused operation matters only for rounding.

Function: int mpfr_agm (mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)

Set rop to the arithmetic-geometric mean of op1 and op2, rounded in the direction rnd. The arithmetic-geometric mean is the common limit of the sequences u_n and v_n, where u_0=op1, v_0=op2, u_(n+1) is the arithmetic mean of u_n and v_n, and v_(n+1) is the geometric mean of u_n and v_n. If any operand is negative, set rop to NaN.

Function: int mpfr_hypot (mpfr_t rop, mpfr_t x, mpfr_t y, mpfr_rnd_t rnd)

Set rop to the Euclidean norm of x and y, i.e., the square root of the sum of the squares of x and y, rounded in the direction rnd. Special values are handled as described in the ISO C99 (Section F.9.4.3) and IEEE 754-2008 (Section 9.2.1) standards: If x or y is an infinity, then +Inf is returned in rop, even if the other number is NaN.

Function: int mpfr_ai (mpfr_t rop, mpfr_t x, mpfr_rnd_t rnd)

Set rop to the value of the Airy function Ai on x, rounded in the direction rnd. When x is NaN, rop is always set to NaN. When x is +Inf or -Inf, rop is +0. The current implementation is not intended to be used with large arguments. It works with abs(x) typically smaller than 500. For larger arguments, other methods should be used and will be implemented in a future version.

Function: int mpfr_const_log2 (mpfr_t rop, mpfr_rnd_t rnd)
Function: int mpfr_const_pi (mpfr_t rop, mpfr_rnd_t rnd)
Function: int mpfr_const_euler (mpfr_t rop, mpfr_rnd_t rnd)
Function: int mpfr_const_catalan (mpfr_t rop, mpfr_rnd_t rnd)

Set rop to the logarithm of 2, the value of Pi, of Euler’s constant 0.577…, of Catalan’s constant 0.915…, respectively, rounded in the direction rnd. These functions cache the computed values to avoid other calculations if a lower or equal precision is requested. To free these caches, use mpfr_free_cache.

Function: void mpfr_free_cache (void)

Free various caches used by MPFR internally, in particular the caches used by the functions computing constants (mpfr_const_log2, mpfr_const_pi, mpfr_const_euler and mpfr_const_catalan). You should call this function before terminating a thread, even if you did not call these functions directly (they could have been called internally).

Function: int mpfr_sum (mpfr_t rop, mpfr_ptr const tab[], unsigned long int n, mpfr_rnd_t rnd)

Set rop to the sum of all elements of tab, whose size is n, rounded in the direction rnd. Warning: for efficiency reasons, tab is an array of pointers to mpfr_t, not an array of mpfr_t. If the returned int value is zero, rop is guaranteed to be the exact sum; otherwise rop might be smaller than, equal to, or larger than the exact sum (in accordance to the rounding mode). However, mpfr_sum does guarantee the result is correctly rounded.


Next: , Previous: , Up: MPFR Interface   [Index]

5.8 Input and Output Functions

This section describes functions that perform input from an input/output stream, and functions that output to an input/output stream. Passing a null pointer for a stream to any of these functions will make them read from stdin and write to stdout, respectively.

When using any of these functions, you must include the <stdio.h> standard header before mpfr.h, to allow mpfr.h to define prototypes for these functions.

Function: size_t mpfr_out_str (FILE *stream, int base, size_t n, mpfr_t op, mpfr_rnd_t rnd)

Output op on stream stream, as a string of digits in base base, rounded in the direction rnd. The base may vary from 2 to 62. Print n significant digits exactly, or if n is 0, enough digits so that op can be read back exactly (see mpfr_get_str).

In addition to the significant digits, a decimal point (defined by the current locale) at the right of the first digit and a trailing exponent in base 10, 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, or if an error occurred, return 0.

Function: size_t mpfr_inp_str (mpfr_t rop, FILE *stream, int base, mpfr_rnd_t rnd)

Input a string in base base from stream stream, rounded in the direction rnd, and put the read float in rop.

This function reads a word (defined as a sequence of characters between whitespace) and parses it using mpfr_set_str. See the documentation of mpfr_strtofr for a detailed description of the valid string formats.

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


Next: , Previous: , Up: MPFR Interface   [Index]

5.9 Formatted Output Functions

5.9.1 Requirements

The class of mpfr_printf functions provides formatted output in a similar manner as the standard C printf. These functions are defined only if your system supports ISO C variadic functions and the corresponding argument access macros.

When using any of these functions, you must include the <stdio.h> standard header before mpfr.h, to allow mpfr.h to define prototypes for these functions.

5.9.2 Format String

The format specification accepted by mpfr_printf is an extension of the printf one. The conversion specification is of the form:

% [flags] [width] [.[precision]] [type] [rounding] conv

flags’, ‘width’, and ‘precision’ have the same meaning as for the standard printf (in particular, notice that the ‘precision’ is related to the number of digits displayed in the base chosen by ‘conv’ and not related to the internal precision of the mpfr_t variable). mpfr_printf accepts the same ‘type’ specifiers as GMP (except the non-standard and deprecated ‘q’, use ‘ll’ instead), namely the length modifiers defined in the C standard:

hshort
hhchar
jintmax_t or uintmax_t
llong or wchar_t
lllong long
Llong double
tptrdiff_t
zsize_t

and the ‘type’ specifiers defined in GMP plus ‘R’ and ‘P’ specific to MPFR (the second column in the table below shows the type of the argument read in the argument list and the kind of ‘conv’ specifier to use after the ‘type’ specifier):

Fmpf_t, float conversions
Qmpq_t, integer conversions
Mmp_limb_t, integer conversions
Nmp_limb_t array, integer conversions
Zmpz_t, integer conversions
Pmpfr_prec_t, integer conversions
Rmpfr_t, float conversions

The ‘type’ specifiers have the same restrictions as those mentioned in the GMP documentation: see Section “Formatted Output Strings” in GNU MP. In particular, the ‘type’ specifiers (except ‘R’ and ‘P’) are supported only if they are supported by gmp_printf in your GMP build; this implies that the standard specifiers, such as ‘t’, must also be supported by your C library if you want to use them.

The ‘rounding’ field is specific to mpfr_t arguments and should not be used with other types.

With conversion specification not involving ‘P’ and ‘R’ types, mpfr_printf behaves exactly as gmp_printf.

The ‘P’ type specifies that a following ‘d’, ‘i’, ‘o’, ‘u’, ‘x’, or ‘X’ conversion specifier applies to a mpfr_prec_t argument. It is needed because the mpfr_prec_t type does not necessarily correspond to an int or any fixed standard type. The ‘precision’ field specifies the minimum number of digits to appear. The default ‘precision’ is 1. For example:

mpfr_t x;
mpfr_prec_t p;
mpfr_init (x);
…
p = mpfr_get_prec (x);
mpfr_printf ("variable x with %Pu bits", p);

The ‘R’ type specifies that a following ‘a’, ‘A’, ‘b’, ‘e’, ‘E’, ‘f’, ‘F’, ‘g’, ‘G’, or ‘n’ conversion specifier applies to a mpfr_t argument. The ‘R’ type can be followed by a ‘rounding’ specifier denoted by one of the following characters:

Uround toward plus infinity
Dround toward minus infinity
Yround away from zero
Zround toward zero
Nround to nearest (with ties to even)
*rounding mode indicated by the mpfr_rnd_t argument just before the corresponding mpfr_t variable.

The default rounding mode is rounding to nearest. The following three examples are equivalent:

mpfr_t x;
mpfr_init (x);
…
mpfr_printf ("%.128Rf", x);
mpfr_printf ("%.128RNf", x);
mpfr_printf ("%.128R*f", MPFR_RNDN, x);

Note that the rounding away from zero mode is specified with ‘Y’ because ISO C reserves the ‘A’ specifier for hexadecimal output (see below).

The output ‘conv’ specifiers allowed with mpfr_t parameter are:

a’ ‘Ahex float, C99 style
bbinary output
e’ ‘Escientific format float
f’ ‘Ffixed point float
g’ ‘Gfixed or scientific float

The conversion specifier ‘b’ which displays the argument in binary is specific to mpfr_t arguments and should not be used with other types. Other conversion specifiers have the same meaning as for a double argument.

In case of non-decimal output, only the significand is written in the specified base, the exponent is always displayed in decimal. Special values are always displayed as nan, -inf, and inf for ‘a’, ‘b’, ‘e’, ‘f’, and ‘g’ specifiers and NAN, -INF, and INF for ‘A’, ‘E’, ‘F’, and ‘G’ specifiers.

If the ‘precision’ field is not empty, the mpfr_t number is rounded to the given precision in the direction specified by the rounding mode. If the precision is zero with rounding to nearest mode and one of the following ‘conv’ specifiers: ‘a’, ‘A’, ‘b’, ‘e’, ‘E’, tie case is rounded to even when it lies between two consecutive values at the wanted precision which have the same exponent, otherwise, it is rounded away from zero. For instance, 85 is displayed as "8e+1" and 95 is displayed as "1e+2" with the format specification "%.0RNe". This also applies when the ‘g’ (resp. ‘G’) conversion specifier uses the ‘e’ (resp. ‘E’) style. If the precision is set to a value greater than the maximum value for an int, it will be silently reduced down to INT_MAX.

If the ‘precision’ field is empty (as in %Re or %.RE) with ‘conv’ specifier ‘e’ and ‘E’, the number is displayed with enough digits so that it can be read back exactly, assuming that the input and output variables have the same precision and that the input and output rounding modes are both rounding to nearest (as for mpfr_get_str). The default precision for an empty ‘precision’ field with ‘conv’ specifiers ‘f’, ‘F’, ‘g’, and ‘G’ is 6.

5.9.3 Functions

For all the following functions, if the number of characters which ought to be written appears to exceed the maximum limit for an int, nothing is written in the stream (resp. to stdout, to buf, to str), the function returns -1, sets the erange flag, and (in POSIX system only) errno is set to EOVERFLOW.

Function: int mpfr_fprintf (FILE *stream, const char *template, …)
Function: int mpfr_vfprintf (FILE *stream, const char *template, va_list ap)

Print to the stream stream the optional arguments under the control of the template string template. Return the number of characters written or a negative value if an error occurred.

Function: int mpfr_printf (const char *template, …)
Function: int mpfr_vprintf (const char *template, va_list ap)

Print to stdout the optional arguments under the control of the template string template. Return the number of characters written or a negative value if an error occurred.

Function: int mpfr_sprintf (char *buf, const char *template, …)
Function: int mpfr_vsprintf (char *buf, const char *template, va_list ap)

Form a null-terminated string corresponding to the optional arguments under the control of the template string template, and print it in buf. No overlap is permitted between buf and the other arguments. Return the number of characters written in the array buf not counting the terminating null character or a negative value if an error occurred.

Function: int mpfr_snprintf (char *buf, size_t n, const char *template, …)
Function: int mpfr_vsnprintf (char *buf, size_t n, const char *template, va_list ap)

Form a null-terminated string corresponding to the optional arguments under the control of the template string template, and print it in buf. If n is zero, nothing is written and buf may be a null pointer, otherwise, the n-1 first characters are written in buf and the n-th is a null character. Return the number of characters that would have been written had n be sufficiently large, not counting the terminating null character, or a negative value if an error occurred.

Function: int mpfr_asprintf (char **str, const char *template, …)
Function: int mpfr_vasprintf (char **str, const char *template, va_list ap)

Write their output as a null terminated string in a block of memory allocated using the current allocation function. A pointer to the block is stored in str. The block of memory must be freed using mpfr_free_str. The return value is the number of characters written in the string, excluding the null-terminator, or a negative value if an error occurred.


Next: , Previous: , Up: MPFR Interface   [Index]

5.10 Integer and Remainder Related Functions

Function: int mpfr_rint (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Function: int mpfr_ceil (mpfr_t rop, mpfr_t op)
Function: int mpfr_floor (mpfr_t rop, mpfr_t op)
Function: int mpfr_round (mpfr_t rop, mpfr_t op)
Function: int mpfr_trunc (mpfr_t rop, mpfr_t op)

Set rop to op rounded to an integer. mpfr_rint rounds to the nearest representable integer in the given direction rnd, mpfr_ceil rounds to the next higher or equal representable integer, mpfr_floor to the next lower or equal representable integer, mpfr_round to the nearest representable integer, rounding halfway cases away from zero (as in the roundTiesToAway mode of IEEE 754-2008), and mpfr_trunc to the next representable integer toward zero.

The returned value is zero when the result is exact, positive when it is greater than the original value of op, and negative when it is smaller. More precisely, the returned value is 0 when op is an integer representable in rop, 1 or -1 when op is an integer that is not representable in rop, 2 or -2 when op is not an integer.

When op is NaN, the NaN flag is set as usual. In the other cases, the inexact flag is set when rop differs from op, following the ISO C99 rule for the rint function. If you want the behavior to be more like IEEE 754 / ISO TS 18661-1, i.e., the usual behavior where the round-to-integer function is regarded as any other mathematical function, you should use one the mpfr_rint_* functions instead (however it is not possible to round to nearest with the even rounding rule yet).

Note that mpfr_round is different from mpfr_rint called with the rounding to nearest mode (where halfway cases are rounded to an even integer or significand). Note also that no double rounding is performed; for instance, 10.5 (1010.1 in binary) is rounded by mpfr_rint with rounding to nearest to 12 (1100 in binary) in 2-bit precision, because the two enclosing numbers representable the nulenclosing numberes a’<"o;, them>int rounds to the, ionsr> be g rulempef="#loatnn,0ren a futu rout <>

Nahat mp.)ex-mpfr_005fasprintf">Function: int mpfr_ceil (mpfr_t rop, mpfr_t op)

Function: int mpfr_floor (mpfr_t rop, mpfr_t op)
Function: int mpfr_round (mpfr_t rop, mpfr_t op)
Function: int mpfr_trunc (mpfr_t rop, mpfr_t op)

Set rop

Set rop to (op1 times op2mpfr_rint rounds to the nearest represen or equal represent ble integer, mpfr_floo to the,nearest represen l representable integer, mpfr_roun to the,nearest represen ble integer, roundiit precisrom zero (as in the roundTiesToAway yed as &qup>A&rop, mpsentable integer, ned value is zero whe is zero,ater tha or -2 when stance, 85 is diase may vary from 2 to 62. Print argteger associ"inde

Note st mpfr_ri/code> is dCplat arghould not be uo 12 (1100 ,ion: seen called ioream, andatance, 10.5 (101:buferange fn: , evers, t precisrom zeri(ifa or -2 when )the directioase maympfr_ceil rounds to thes onluepegas 10.5 (y other mat en called by a se.e., the uet when mpfr_risound-to-int is an ino,ater thavariable.c. The follo (resp. iffero,ater ckquote>mpfr_ri 4-2008),eode numbercode> is d

&rop,
ev7the direction s8n is zero wit-ahat ouo;<"o;, thp>An .6odei>, a8dex-mpfr_005fasprintf">Function: int  (mpfr_t ropop)

Set rop

Set rop to (op1 times op2 vaartt is smaller. More tionpointer utpu

as smaller. More 85 is diase may vary from 2 to 62. Pri (unthe ue>) with be uo 12 (1100 , the computed v allectdl> vaarttIn directi If th ne ng f matter> vaarttmp>&en>Function: int (char **stto mmpfr_t op)

Set rofdt>

Set rop

Set rop to (op1 siaddianeously

e>mpfr_t vaartt is smaller. Morter, otherfdt>
e>m ng f matter> vaartt is smaller. More 85 is diase may vary from 2 to 62. Pri uot;%.0RNs under the coariable).
eer, otherfdt>
e(
m
presentable inte(/em>

rop to with o, and rofdt>

rop to with)ing

eer, otherfdt>
ercalled wi. ould ha0 alle>mpfr_,aterple">

ckquoters written index-mpfr_005fsum">Function: int (mpfr_t rop,o mpfr_t op)

Set ro_t rnd)

Set rop to the Euclidenction: int (mpfr_t ropop)

Set ro_t rnd)

Set rop to the Euclidenction: int (mpfr_t ropop)

Set ro_t rnd)

Set rop to the Euclidep1 times >

e>mpfr_t constant 0.5ar>ro_t )&helli 85 is d ver, rounds to the nm>= rins" aecti counti tha85 is d e is zero wefault precision>,o mp;A&rd in the ISO C99 (Section F.9.4.3) and IEEEction 9.2.1)7.1/var>. R functior>&lsqinfinity, then +iamp>YY
argteger s under the contr in treed usiq/samp>&rAecimal the ft precisione roun*q>
(m when ophe string, exclbn the

In casd> o;Note fdl>

nd &lsqut to : sed in, them>inmberbe theaise, it etweero we the other ndeifferent frnx ckquotehe &e te tha or p mattcd asTinstead (howeve
mpfr_t<

ore lex-mpfr_005finp_005fstr">
Function: size_t (mpfr_t roppmpfr_t op) to op roould hand iro we fis smaller. Morte in ropr-Related-Functions"> Rounding Retted Output Functions Function: int ptstroong>ma hstronto >mpfr_free_cache (void)ptong>ma hsto >mpfr_t op>Set rop to the Euclidep1 th nearest. The following ntr in tr62. Print Function: size_tptstroong>ma hstronto >mpfr_free_cache>Set (void)ptong>ma hsto >mpfr_t op th nearest. The followingdex-mpfr_005fprintf">Function: int mpfr_round (mpfr_t rop, mpfr_t op)<_t rnd

Set rop to the Euclidep1 n rop wanted pt prechat tPREC_MINmp with o, lt prechat tPREC_M>precisio (ler than, / ISO TS 1866iring amp>’ mpfr_roune *r than the maxded in t_t r>, evnew set_s gAe

Note mpfr_ eilmpfrar>rop*r than the maxded in t_t hnly)dontr 2 tompfr>iq/samp>&rH= oneclassxded nereoundin necessarily corble integer, rou/dd>

tiowtoectively, algoof Eultoations iavarirop>empfr_t x; mpfr_init (x); … mpfr m> N1e*/ m> c:

In rel="index/coomR Interface>x/coompt-Index" titlndex-mpfr_005fsum">
Function: int mpfr_round (mpfr_t rop, mpfr_t op)
)

Set rop<1>

Set rop<2t rndto the Euclidep1mpfr_t e

Na namead tocisiwone *r thacode E(b)-/em>nm>= < is annaand iro w /dl> e

Note vary from 2 to 622t xt re0ller than, (e> sta of bytr cast reInf)amp>grint/p> rs writte/samp>&rsqu 2 to 621>eisp> 75r>xNa vary ed The follofInf is r 621>code> is diffe: m protss. variable.nap rel="indeive> ar-teger">ive> argtegertitleopmpfr_n san the max/em>e

NThe following rounds to the aIuseful P dok repegatde>rintmpfr_t x; mpfr_init (x); … mpfr, (b,tl n that the rouhat the Z, x wit+ (ds ==ihat the r))) ...amp>’, &lsqntegti Iifr 2 to 62. Pri isp> cheok rhrionsced g rule ye/em>+1n, the

Na vary ed The foll: rhrso,rionsced sureme="Inpu2-bit precision/em>e, thpxt reia decimal pionsced variable.napive> argteger in b> variatweeop, de>mpfr_t

Th-1 when ouo /em>e, thdex-mpfr_005fsum">Function: int y corresm>(char **sttin>mpfr>op)<_t op roould havarie defode numbeexclbn thr>mpfr_u2-bi memore wrd base, the of in t_t rt re0lfInfs in the ISO C, e> sta of 0. (tab is an i /dl> t the ilthesi>, at prechat tPREC_MINmp with.)ex-mpby e fn: hnly)dex-mpfr_005fprintf">Function: int tstrooSettronto >mpfr_free_cacheaptemplp>Setto >mpfr_t op>Set rop to the Euclidep1Note t/pre>Note t/pre>Note t/pre>Note /pre><)ts under the control oThe following rounds to the red. -1 first ifr 2 to 62. Pri ispn

Rounding Related Functions, PrevioE &lsqg Rref="#Formatted-Output-Functions" accesskey="n" rel="next">Rounding Related Functions, Up: MPFR Interface   [Index]

Remainder-Related-FunctionMiscellaneousounding Retted Output Functions Function: int (void)op)<_t rnd)ase base ed in t_t e"> called with the therm> < iplt_s in t_t el=" firs numbee(

Note an the maxded in t_t xel=" firs numbes). ed zero,ater thabe theanckeepquo; specifd ba>buf&en>Function: int (void)op)<_t opint conmpfr_free_cache (void)con>op)<_t op roEpre classe>mp> =DbufYFunction: int (char **sttinmpfr_t op)

Set rop<1>

Set rop<2t rndSet rop to the Euclidenction: int (char **sttaxmpfr_t op)

Set rop<1>

Set rop<2t rndSet rop to the Euclidep1 times op2bufmpfrthe othe/var>, following

the. ed in tle1t , following
e strine do+ ISO . e smalle1t , following
-0l>bufFunction: int (char **stuonldombmpfr_t op)
) to the Euclidep1Thdiusinbu ed Tnldom, following bef 1o the. 0 when op numbeet the ised p Tha /block

Na Tnldom(c fined by th, the, -0/code> is dould ha0,mal. Special vquo; aloat ito the l. Speciaonly), e> e, it etweear>, following

the< the fnd iro weteger rep is an in(oni< ther conaresthr anrminap mattcenegatlsqutn resyents and sar>ro)ing < the tye>mpfr_tIn cas)mpcisiof mrucs ae is diffe:id strimpfr_cp>e is an integer ded in trdt>
eer, tding wnteger ded in tst/de/var> n ev it eplate</samiz dex-mpfr_005fsum">Function: int (char **stuonldommpfr_t op)
) >rndSet rop to the Euclidep1Thdiusinbu ed Tnldomel=" firs> numbee in trdt>
et the ised p Th
Tnldom<,eode numbe nldomFunction: size_t (char **stgonldommpfr_t op)

Set rorp<2t r) >rndSet rop to the Euclidep1-1 first choatnn>

ntx-mpby el=" firs> numbee in trdt1t Tnldom<,eode numbe w=nldomFunction: size_texp>) (void)op)<_t op roould havaril. Specia is smal_t rtables have th in t_t Function: size_t (char *bufop)<_t ) to the Euclidep1 th nl. Specia is smal_t Function: size_t (char *bufop) to op roould ha fnd iro weteger rfis smaller. Morth Thy, asdl> ng nof thnd-to-ied with tsely, t, -0 red. h Thy, asdl> ng nof )iex-mpfr_005finp_005fstr">Function: size_tmpfr_free_cache (char *bufmpfr_t op)

Set rop rndSet rop to the Euclidep1 fr_t constant in trdt>

eC99 rule for the ng nied in tslowing Function: int mpfr_free_cache (char *bufmpfr_t op)

Set rop<1>

Set rop<2t rndSet rop to the Euclidep1 fr_t constant in trdt>

eC99 rule for1 the ng nt; for i is smalle2t m presentable/f sdl> (/em>
rop<1>

Set / ba, t (/em>rop to withlex-mpfr_005finp_005fstr">Function: size_teapgf

eopeFunction: intintintint fr_t >e &nments undedut, prechat tVERSION_MAJORmpF for hat tVERSION_MINORmp with o, and ophe stmajcurrtiooha="#lpatch lahalme &nments undedust, prechat tVERSION_STRINGmpt fr_t >eN thf the temem> tx,on sp displhalopfr_tne tionartion specio,ater ckqt precision forp>empfr_t x; mpfr_init (x); … mpfreFunction: oprmajcu>

rotiooh>
ropatchlahal/var> to the Euclidep1n rop inator, utpue"act fding to nearhat tVERSIONmptmpfr_cvar>rmajcu>
rotiooh>
ser, otherpatchlahal/var> . H= oneclassxded nereoucheok varioncepp>empfr_t x; mpfr_init (x); … mpfr#e< #ensalamp>’, &lr_005finp_005fstr">Function: size_tapgf op&rsquode>m ng onceklibt argist t strioncekp>eonceklibt argp>e. Rpatches>&rsquode>mresp. lnt(tioni(w-vime)>oncekp>e&rsqo nearestoniFunction: size_t (mpfr_t ropp>oponcekw 75tioni(whe Thesnput safe retur tioni(wr-lahalmTsnput LocodeStoragen(onar>, ,>oncekw 75builp>

Note, prec--en>&rs-esnput-safearest modonfig aeFunction: size_t (mpfr_t ropp>oponcekw 75tioni(whe

Ndecefodoncekw 75builp>

Note prec--en>&rs-decefodo

arest modonfig aeFunction: size_t ls> (mpfr_t rop ls>p>oponcekw 75tioni(whe

Nard inive> ls (onar>, ,>oncekw 75builp>

Neien -gon-buildquo;, prec--en>&rs-gon-inive> lsarest modonfig aeFunction: size_tmpfr_free_cacheapbuildf ttounesces>>opg &nyou ypgdex-mpfr_005fprintf">

Rounding Rela href="#Rounding-Related-Functions" accesskey=Cionatibility-

-onclated Functions, PrevioCionatibility>

Nonctput-Functions" accesskey=Miscellaneousounding Related Functions, Up: MPFR Interface   [Index]

Rounding Retted Output Functions Function: int exp>) (void)opint exp>) (void)opxter arid str t

el=" firs>vhat theing

el=" firs vhat the isp>ed ions roavimes 2 raisode>mresp falue o;(="#loat r>xop<1 - epsid><)avimes 2 raisode>mresper>x=< (deanrdspioe mayan the maxdedol oeplFunction: size_t (char **stsf op

)Function: int (char **stsf opexp>)Fp1 fr_tfalue o;< ther>xter arid stret

el=" firs>vhat theieould ha tod iro weteger alues smalexmpfr_00al vquo; aloat only)s=c&lsql abyeesp /dd>

ot/sa ( aloa sptas pegatfalue o;< str>xmal. Speciaonly), eial vact/hrep ier tsibility>eoucheokmberito the t

el=" firs>vhat theC99 (Sioe may. wr>ter arionly) (f

behng Function: size_t exp>) (void)opint  exp>) (void)opint  exp>) (void)tinmpfr_t opint  exp>) (void)taxmpfr_t opter arid stpresentable/f op.valese+ ISO C99 (S/dd>
ot/sa deanrdedu,svasam mpoogram retur t precisionsf tax()to with stpresentable/f Function: size_t (char *bufop)<_t rndSet rop to the Euclidep1 ar-teger">ive> argtegertitl.
s .
nluepaectitt , attherm>,
riginal vied in t_t x, attherm>, t rero weied in t_t amp>g
c&lsq the  ISO C: Itaren>
ter arionly); fr_t constant in ttt n, tx, attherm>, t re

, attherm>deifferent funthe utocis>mpfr_riso may. wro,ater in t_t , quo;o; sinInteteger recti_t argteger in ;ropag/deddex-mp&lsqiffe:iinfinity, then +iamn Ympfr_ris)auo; sp uo;orent. mays frsave thcer co a s cientof tduundininive> lations ot/sahdex-mpfr_005fsum">Function: int (char **stsubnhreftiz o fr_t op)<_t rndSet rop to the Euclidep1el= subnhreft< so thaaof Euetic: ied in t_t ive> argtegertitleaectitt n argteger aectitt rachesent.snce, 10.5 (1010;roe, mss 0 when op inator, ubnhreft<,cders:1010g to)opiwone *r thacode o)op1.5 addiiasil abyeewone *r thacode o)opiwone *r thacode o)int/p> oat The following ="#loat Tis an inive> argteger fdinaluestions s ha in t_t mp> mpfr_risod zero,ater l vtionartion speci iactpioe, quo;o; sinInteteger recti_t argteger in ;ropag/deddex-mp&lsqAct flag,eied mayTis an inive> argteger the tyThe follo cito t (bsentable thinInte in t_t oneclassxded nereouehe two .snce, 1sual behaaof Euetic (e two 6454-2code> to the n returnonce:ex-mp&lle">mpfr_t x; mpfr_init (x); … mpfr{ m>e, 1snce, 1a, b; m>ptx with53); m>mp24); m>hxa ixa, xb ihat the r); i =rndhxa ii that the r); /* . wrive> argteger */ m>esdatance, 1sual behaaof Euetic af thable.c. The foll inator, ubnhreftFunction: size_t (void)opint (void)opint
(void)opint (void)opint (void)opint (void)opdifferar, oelleonly)o em>(s frsiex-mpfr_005finp_005fstr">Function: size_t (void)opint (void)opint (void)opint (void)opint (void)opint (void)op fr_tgn differar, oelleonly)o em>(s frsiex-mpfr_005finp_005fstr">Function: size_t (void)opdiffe, oelleonly)o em>ndex-mpfr_005fsum">Function: int (mpfr_t ropp>opint (mpfr_t ropp>opint (mpfr_t ropp>opint (mpfr_t ropp>opint (mpfr_t ropp>opint (mpfr_t ropp>opdiffe, oelleonly)o em>n<">
-oncla href="#Rounding-Related-Functions" accesskey=C/coomR Interfaceated Functions, PrevioC/coompt-Index" titl-Functions" accesskey=E &lsqg R"next">Rounding Related Functions, Up: MPFR Interface   [Index]

-oncla href=>
-oncla href=t Functions W

Nonctprint">p>AlRelatemY< )same="Fop<2oponcekis rcionatibility>

Noat aNU>onFuncti>onc. Bp insertent. mayse>rintdsauo; spote prec#in sta befgmp.h>mp with lp>d,"example">mpfr_t x; mpfr_init (x); … mpfr#’, &lsqanympoogram wof tenkis roncet the itioni(whe vary ly>

NoncR>

ouerarya_hnly)e nd &lsquote precquo;workid str>rs writo (reypamed descriptto with).vAde>op>Note arest. oncR>The following, e, it etn;btho,of t:

ptong>ma hsto >mpcision&rtab> =mpfr_risr4-sai tiz
the: t seisIuseful ts. Noncdex-mp&l5fstr">Function: size_t (void)op)<_t rnd
to the Euclidep1

T>e, thdeTsp. speccalled wcet:

frage/em> exppable_u2-b b> valuepenoughrd; for ir thd base, the fn the ntrol oeto the >terctionfmemory set_s fInf is rx. Prin ame mers pegatO TS 1866iring Function: int (mpfr_t ropop)

Set rop<2t rund ba intt to op roould hand iro we fs smalle1t mpfrnd iro we, Note utpul. Speciau"#loat dutpueirse aectiop3/var> e, thpe>mpf be the866>mpfrp>YbRis an ro we,racters ieg sequence ofis tween whfInfcionatibility>

Noncheoegiorquo;pfrommnrdqeoundinite,racters ieDod or tabliteeien =en er>x, a1dex-mpfr_005fsum">Function: int (void)op)

Set rop<1>

Set rop<2t rndSet rop to the Euclidep1, followingieg sequence ofintguaonlte> variable.napThe follo navarier-an, t called wce; eiaj/codtions isp>ed |tsmalle1t

eer, tdirThe following rounds to theop>Function: int (char *buf2exp>op)

Set rop<1>

rndSet rop to the Euclidenction: int (char *buf2exp>op)

Set rop<1>

rndSet rop to the Euclidep1 2uimp with o, lt precisiono;,>2uimp with r,apop.valese+tem supports I specklsqufInfcionatibility>

Noncheioeather c an fer*> 2uimp with o, lt precisiono;,>2uimp withe,racters iex-mpfr_005finp_0><">

href="#Rounding-Related-Functions" accesskey=Inive> lseated Functions, PrevioInive> lsartl-Functions" accesskey=Cionatibility-

-onclated Functions, Up:

Nonctput-Fy="u" rel="up">MPFR Interface   [Index]

href=>
p>Socif&rsquc/dipportablasionok vo >, dl> varimemoryeer, tdiir obj naodeHneares, varioncepmemoryedesdl>
intwelememiionf yousuitraee 01inS; for suitrarsquc/dipport>, C/coompt-Index" n&rTmayse>rintter seioeadintablonceiase wonode>:ex-mp&lua>Fuli> Eien memodret

el=" firs> so thaas

In cascriptto withquo;/li>uli> Eien o-2008 donok aule> n mrucse tempot argIn cascriptto withu/li>u/uum">el=" firs numbesegatlsqugarbagent. mayn sp memory:e de>varimemoryemanag (>terctient,ndesr_tyent,ngarbagent) repleft ntrol oarsquc/dippn&rEait quence ofintonin F.9.a eac weis refe, i wcTh-1as n :id stneclassx> mpfr_risr4-sai tiz el=" firs> so ths return value is tC/coompAterctiesa (aNU>on/code> is diffe 2:ooncep>mpfr_risr varimemoryerfis value is tterctioThy, amemoryeuo;Function: size_t) (void)opmpfr_ge/em>to the Euclidep1

el=" firs numbeexclan the max/em>iex-mpfr_005finp_005fstr">Function: size_t (void)oprndto the Euclidep1heo>=aa rea ckqt precisionc/coom;gf vmiiIn rel="indeInive> lseoInive> lsartlndex-mpfr_005fsum">Function: int (void)op)<_t rnd)rnd, ches * in ts base, thet 4-sai tizamal pohr>gIn cascriptto withuo, lsf ty,rtb="exampua>Fuli> ikqt precABS(kihe) ==ihat tNAN_KINDmp with,d in t_t

the;">/li>uli> ikqt precABS(kihe) ==ihat tINF_KINDmp with,d in t_t
e thinD t precsdl>(kihe)mp with;">/li>uli> ikqt precABS(kihe) ==ihat tZERO_KINDmp with,d in t_t
e thro we,f sdl> t precsdl>(kihe)mp with;">/li>uli> ikqt precABS(kihe) ==ihat tREGULAR_KINDmp with,d in t_t
aro,gulau numbe:qt precx = sdl>(kihe)*s base, the*2^exmpfcisionu/uum"mberir>roaritfn shr in ts base, thet faulteren quo;>terctioe tye 01i Aet

el=" firs> so tha4-sai tiz de

Not sequence ofcanquo;btho,siz deretur t precisionsf N>

iex-mpfr_005finp_005fstr">Function: size_t (char *bufop)<_t op roould havarieto the kihepohr>gIn cascriptto withuostcrsquoe by > N> Function: int c/coom;gf op)<_t op roould haa1 first ontrol oi base, the fding t>gIn cascriptto withu4-sai tiz de

> N> Function: int exp>) (void)op)<_t op roould havaril. Specia is smal_t rtables have th in t_t Yin producoe ty trapnN> Function: int (void)op)<_t < to the Euclidep1 col-ey er, updtioey, a/po>rigina> < N> <">

lseo href="#Rounding-Related-Functunctions" accesskey=C/coomR Interfaceated Functions, Up: MPFR Interface   [Index]

lseo href=>
lstted Output Functions lsarrint">s"> p>Alted dimbmpem>(meanhrtaripartpohr>gaddii-an the max so thafor ifn the precis_limbtto withn&rTmayIn cascriptto withueypaii rrvarckqaf mrucs ae,:ex-mp&lua>Fuli> TgatIn cas_tabley comp with Ya> t prechat tPREC_MINo withn<">/li>uli> TgatIn cas_tablesdl>mp with Y /li>uli> TgatIn cas_tableexmpfcisio Ymal. Specii Anil. Specia is0(meanhr> Tndix1 firsaj/codabnved n (=modreaddiiasilrp>ed 2^n (er-an, tht; for firsi Ae ca, n /li>uli> Finagoy, tdirIn cas_tabledmp with Y precis_, th_per_dimbmp with).vNd id ngulauthnd-to-called with the ca, I>Y- a see thtocis fined by t ng n
2.x,t
eac we roundINTMAX_CmpcisiosIne roundUINTMAX_Cmpcisioswas tween w (e.g. aluestdirIn cas__STDC_CONSTANT_MACROSmpcisioseac we adtcientdeeen w befemorIn cas befstdirsih>mp with Ine round befirseypasih>mp with h Thcientin sta d), round> -e thca s6(aemorp op, round> NBoost) -e thcheok fInf roundINTMAX_CmpcisiosIne roundUINTMAX_Cmpcisiosed indis>&rsinhNote se>rint:ex-mp&lua>Fuli> Poogrameswof tenkis oncep2.xlent f eese round> gIn cas#tween hat tUSE_INTMAX_To withe &nararbefemorIme="Fop/li>uli> Tgats oni(amal pofppoogramesent fworki

Noncep3.0 oncep2.xlcueontrol oanoe, msdescinbe F.bnv, rigsiroa, puitras tweenturnt prec> /li>u/uum">

Tsp.dinner-by-be t gatlsq/saned ew aloncep3.1i Hnearesturnther c quo; atroduco incionatibleiihnly)esis poogramesent fusiny ly>fa>rin varioncepAPI etucetegatgatlsq/sant th>

, PrevioR,led wceetput-Functions" accesskey=APImCionatibilityl   ns, Up:   [Index]

Cinsinbu orstted Output2ounding-un so thedioCinsinbu orstpr2m">, Guillale_eHanrot, VtucewitLefèvra, Pasinyk Péligsiws, P, sippe Tgévenmser, Pmp> Zimmermano. t-mp&lsqSylvieNBoldorh theENS-Lysa,.Fredcg, cinsinbu ed varifatted-Oult precis< withdeSylva alChctillard cinsinbu ed varit precisionai < with quence o. DS 1d Daney cinsinbu ed varihyparbolicf reo-p>eemp with o, lt precisionatanem with, er, af/vationsnp>e< with. Laud witFonsse cinsinbu ed variIn cascriptsum < with quence o. Emmanrel Jeandel,fh theENS-Lysaonto, cinsinbu ed variren> liquence olt precisot/sa sp>d," reom;ron de >e 2exp>< with quence o. t-mp&lsqWrioer cothe ut; fornk Jean-Mic el Mullthaa, lJorisnpaalplr Hnive vfcusp>ey fruitful discu&nmsah-r ir thbeginnturn ,ful nputturneot/sai Ial/arteculau Katin Rydesdidha tr&rTmayplhalopmecia isvarionceplibraryioer coquo; a secientrigsiroav

oue egatepltoluonsnnupacrta isINRIA,&oohst erer str>e membbesecsounupacrte Fbysa g log, i l" gw 75/artly> upacrte FbysvariERC g

ot/sa-Licewselated Functions, PrevioaNU>Fd e Docu/dl>ot/sa Licewseartl-Functions" accesskey=Cinsinbu orseated Functions, Up:   [Index]

R,led wceetted Output2ounding-un so thedioR,led wceetpr2m">Fuli> Ric ard Breciau"#lPmp> Zimmermano, "Mwitrn Cions ireAri Euetic", CePr &n (rounpp&rs f thevariaup>ohs’pwebrpag ie">/li>uli> Laud witFonsse, Guillale_eHanrot, VtucewitLefèvra, Pasinyk Péligsiwsau"#lPmp> Zimmermano, "Mnce: A Muliiase-Pn the maxB two .F

el="PfirsaLibraryiW

NCble.napRhe foll", ACM Thttp://doi.acm.org/10d1145/1236463.1236468 Outie">/li>uli> Torbjörn Gredle f, "aNU>on: TgataNU>ouliiase Pn the maxAri EueticaLibrary", np>ehttps://gdd>ib.org Outie">/li>uli> IEEE5ntandard f866> two .t

el=" firs>aof Euetic, Techn/counR, ort ANSI-IEEE5Standard 754-1985, New York, 1985n26, n1985: Am>/li>uli> IEEE5Standard f866F

el="PfirsaAri Euetic, ANSI-IEEE5Standard 754-2st8,e2st8. Revhe maxdedANSI-IEEE5Standard 754-1985, nppron deJun 12,e2st8: IEEE5StandardsNBoard, 70rpag ie">/li>uli> Donagd E. Knup>, "TgatArta isCions irePoogrammoll", vols2, "Semolum>/li>uli> Jean-Mic el Mullth, "E>oo .Fmpfr_ris,ot/sa", Birkhänsbe,NBoston, 2"#ledition, 2st6de">/li>uli> Jean-Mic el Mullth, Nicondi Brisebarae, F el="PfirsaAri Euetic", Birkhänsbe,NBoston, 2st9de">/li>u/uum">&l">

ot/sa-Licewsela href="#Rounding-Related-Functions" accesskey=CinIndex], PrevioCintlsqunteger-re-Functions" accesskey=R,led wceelated Functions, Up:   [Index]

GNU-Fd e-Docu/dl>ot/sa-Licewsetted Output2ounding-npp< fox-IApp< fox A aNU>Fd e Docu/dl>ot/sa Licewsearr2m">s"> ot/sa-Licewsela href">s"> ot/sa-Licewsetted Outpu"#Roeg ba="cewited-V>eFd e SoftwarttFonndation, Inc. 51.FredklintSt, Fifp>NF eyioea sepermf tedpeoucopmser, dissinbu enp>ebatimucopi)e ,tgutfihnlytter wdex-m’, &">oa>Fuli> PREAMBLE">i>ed name (inator, ense6m aablrttep>eyioeaegatgllectpfrinamedompeoucopmser, hedissinbu enit,

Norv

ouermodifytincommerthodoy. Sehe tarily,teg seLicewse6pwhenrvdesis variaup>oh r>n&rTm seLicewse6iria kihepohr“copmleft”, e, it workt dedote ocu/dl>irhrtariaNU>Gen>ser manralsnhot/sa=t>gname poogram ther cococif

Nmanralsn;ronne 01dtor, ecifnamedoms for ir t oftwartfuli> APPLICABILITYdAND DEFINITIONS p>&rTm seLicewse6arsqu C din tyrmanralr stfractawork, alatyrmsdium, for s ntaimsr fndticetplace Fbysvaricopyrie mhhfldde>sayt”, bed i, r,ledC din tyrpuitrmanralr stworkd nAtyrmsumbeexclvariaublicerepa licewsee, peireanhr>nyrworkis ntaim 01dtor Docu/dl>i streacrtomaxdedit, eien ebatim,Norv

modifuc/dipporo, /s vs xclvariDocu/dl>itaatrdealsnexclusov>op9

Note er-an,ppohipl isvar /ublign ohstxclvariDocu/dl>itolvariDocu/dl>’s oresagl subj nas(or vo er-an in

ioftnar>oresaglqsubj nad n(g u>, iter thDocu/dl>iiNote subj nasorv

er-an in&rTmay“Invhat l>iSacsil s” a (x)ertaim Sehe tary Sacsil t whcse6p> iSacsil s, 4- vari>dtice ent fsde>-e r ir thDocu/dl>ii 6intfi ir thabnvter w2-b;bthcd ng iraylepltaimebe t Invhat l>iSacsil sd nIfmr thDocu/dl>iintidentifyr tyrInvhat l> Sacsil t tluestdire ers >inen&rTmay“Cfvdtice ent fsde>-e r r thDocu/dl>iin”ucopmsxclvariDocu/dl>ireanhr>seac>ioe-nput theieppy, ,e when &rs tolvar ren>&rs fIn revhe 01dtor,docu/dl> ssiaie mfInwardop9

Nren>op9 vail>&rs drant&rs fIn inIntetolvrev-e"t &rs fIn inInt tolvrev-e"t mY< ) e" whcse6markup,r stabs wcetxclmarkup,rh Thcient rrvly)d tolvawart stdiscerrag psubi Aniimag e" iriquo;T iteusedrh xclvrevd nAscopmsvar shquo;“T”ui&rs fInuotshh copi)ehin sta pla m ASCIIv

ouermarkup,rTreinfo inIntefInuot, LaTeX inInt fInuot, SGMLsIne ac wnym>XMLsreturna aublicop9 vail>&rs ac wnym>DTD,f rentandard-eplfInuturns/dd>HTML, PociScriptsIne ac wnym>PDFsdes ba inh imag e"ehin sta ac wnym>PNG,f ac wnym>XCFstheamac wnym>JPGd nOpaque e"ehin sta poopatetwo .t"ehent ft the relaf resdit wh n &noes,rSGMLsIn ac wnym>XMLshDTDro, /s poo> &ne codtolesart quo;ren>&rs,f revarieac>ioe-ren>HTML, PociScriptsIne ac wnym>PDFsproducodlbyenocif ordspoo> &noesnh&rTmay“T> rint ,vodrayip> 6“Enp> iwhcse p> op XYZsIneepltaimsrXYZsial/ardl>gasesrse>rint 6nh”, “Deduc/dippo”, “Endoesa/dl>h”,sIne“H sdIny”d) ngoe“PwhenrvdtegatT> 6aluesyourmodifyrvariDocu/dl>ireanhrtaatrurno,ma msm s 6“Enp> t sedweenttoman&rTmayDocu/dl>iraylin sta W rrvlty>Discla mtesenrev-eo vari>dtice e, it ntat >-e r ir seLicewse6arsqu C dinvariDocu/dl>d ng uc/dippFe r ir ts W rrvlty>Discla mteseuli> VERBATIM COPYING p>&rYounrayleppmser, dissinbu enr thDocu/dl>iialatyrmsdium, eien < commerthodoy incommerthodoy, ;ronnerdon r ir seLicewse,rtar copyrie mh>dtices,f revarilicewsee>dtice sayteamor,e woducedr alall copi)e,f revar youradcoquifract epldition75 hatsoarestooethcse6inttab vrchn/counmeasur_savouoblmrucssIneepltrolNote erutturn p< cionews/dipp N a updat dit>edex-mp&l/li>uli> MODIFICATIONS p>&rYounrayleppmser, dissinbu ena Modifu FV>eign eop r seLicewse,r

Note oodifu V>e,ir uThlicewsi01ddissinbu oma o, lmodifuc/dippF isvarioodifu FV>eeFuli> Use(inator,T> ny)naip> ,f ref thevacse6

1d nWnit is gan the maxintable.er thndina wholat numbeexcllimbodecimal.> &nh, ther ir thd inehe dedote tia codero we.t">/li>u/uum"><">
, PrevioCinsinbu orstput-Functions" accesskey=MMPFR Interface   ns, Up:   [Index]

APImCionatibilitytted Output2ounding-chaptted-6 API Cionatibilityarr2m"> 6iritindescinbe ocifAPI _hnly)esi>r i cito t h theionst>eNfldde>oncekp>ee, st is dAPI _hnly)est th> eebehfinemory m mayse>rintinttablonceiasive> ls, _hnly)es m mayO TS 1866wanted p wonp>ew 75o,gardn F.9.angugsInfngnts andding TS 186dex-mp&lsqActasren>eN="#Fhap>erigsiroy gatlsquase majcusp>e=etn;btho,mnvr,samfail aee alnputyefixed); er, iter thanoe, ms
int/n In rel="indeR, ortel="BursmpR, ortel= Bursartlndex-mp&lsqHneares, ampoogram wof tenkis varieto the oncekp>en byee semanral/ &narilyrworki

N/vationsnp>e 6ther cohelpsplhalopbeseeouwof aiacrt theiepdecode> is diffe: Ine"/sa mpfr_ch=neNfen ist theiending-/dl[   tedTypalthe Macro Chnly)eartl:="Inde="IndeRounding Related Functio2">Add>Rrmatted-Output:="Inde="Inde="Inde="Inde="Inde="Inde   5">ame m Chnly)eartl:="Inde="Inde<">

Rounding Related Functions, PrevioAdd>Rrmatted-Output-Functions" accesskey=APImCionatibilityl   ns, Up:   [Index]

Typa-er,-Macro-Chnly)etted Output Functions <6.1 Typalthe Macro Chnly)earrint">p>Tsp. fe, iouneypaid stl. Specia ISO C9_hnly)d Y the roundis_exp>) < with >m > ) < with aloncep3.0d ng ) < with ode>o,ma m vail>&rs Thy, rom)esY theard (

N -called witmeanent)d ng ) < with s tween wh.9. roundis_exp>) < with

N> tabl value i_exp>) < with; gutfe semaya_hnly)F4- varifus aen cov>opi returnoatyse>rintmpfr_t x; mpfr_init (x); … mpfr#)rnd)< #ensalamp>’, &">p>Tsp. fe, iouneypasid stan the max ISO C99ninhop9_hnly)d Y the roundis_mpfr_gmp with o, lt precisv>Set < with e *> Set < with aloncep3.0d ng , shnly)Fw 75actlagoy dioeaantt Note se>rintmpfr_t x; mpfr_init (x); … mpfr#Set # tween i_>Set rndSet #ensala#’, &l/vg semeanhrtaatrurned vafe dintabltari ew. fe, iouneypas > Set < with alyoustpoogramenSet < with (deeen w aloncep nn &rTmayan the maxeypai roundisquompfr_gmp with ( roundis_mpfr_gmp with)Fw 75und ba i befemoroncep3.0;rurned ind ba id nt prechat tPREC_MAXmp with h Thquo;_hnly)do moughd nIntwed varioncepepderr -ciento ba id fragehe nuiepderent fintpable_e tye 01dabnut e wrsdl>edn &nhckqt precisionmpfr_gmp with ther coworki

N/aC lthe /po>once p>eei fin de ISO C dintnd ba inon)es mil. r &nmsah-cueontrol o flagaaof Euetic conp>e /p> e< diasesuitraeode. tabin) for t precisionmpfr_gmp with ed v ba inner, runeagaimstloncep2.xn&rTmayThe followingsqt precardthe xmpal repwerero,> (e semie ma_hnly)F4- fus aee >empfr_t x; mpfr_init (x); … mpfr#tween ardthe Nthat the r #tween ardthe Zthat the Z #tween ardthe Uthat the U #tween ardthe Dthat the Damp>’, &l/vg irThe following “The f aode h thero w” ( roundhat the Amp with)Fw 75ada dias oncep3.0 o nearestntrThe following precardthe Amp withil.isitndex-mp&l">

Rounding Rela href="#Rounding-Related-Functions" accesskey=Chnly)Rounding Related Functions, PrevioChnly)Rrmatted-Output-Functions" accesskey=Typa-er,-Macro-Chnly)ee   ns, Up:   [Index]

Add>Rounding Retted Output Functions <6.2 Add>Rrmatted-Outprint">p>We mpfrih=mbphabequcoun, fragewererada diuo; sponcep2.2,f reo->e, it oncepp>eFuli> t precisionadaedmp with aloncep2.4ie">/li>uli> t precisionai < with aloncep3.0a(i cionlafe,il. eri/dl>ol)ie">/li>uli> t precisionasN, x);mpcisios aloncep2.4ie">/li>uli> t precisionbuildf ttdecefod>p>< with o, lt precisp>< with aloncep3.0de">/li>uli> t precisionbuildf ttgoninive> ls>p>< with o, lt precis>/li>uli> t precisionclearsromby0mp with aloncep3.1 (/po>dinner-by-be t gatlsq/sa)de">/li>uli> t precisioncopysdl>mp with aloncep2.3 siffe:ioncep2.2p adt>gIn cascriptcopysdl>mp with quence oftnar>w 75 vail>&rs, gutf>intdocu/dl>n ext re

N -vlie mhcalled wcetinator, emakqucs ( lue tor, ehe tyinInteop>/li>uli> t precisionc/coom;gf e vail>&rs via a eac wel/vame="Fopmpfr_t x; mpfr_init (x); … mpfr#tween isionc/coom;gf ’, &l/vg usp_pderent f eesseeouworki

N>mpfroncep2.xlthe Mncep3.xather c tabl value is tc/coom;gf uli> t precisiondsrommp with o, lt precisionovsubmpcisios aloncep2.4ie">/li>uli> t precisiondigamma>< with aloncep3.0de">/li>uli> t precisioncomby0>p>< with aloncep3.1 (/po>dinner-by-be t gatlsq/sa)de">/li>uli> t precisiono;,>dmp with aloncep2.4ie">/li>uli> t precisionfwinmp with aloncep2.4ie">/li>uli> t precisionfwsmp with aloncep2.3 s">/li>uli> t precisionfN, x);mpcisios aloncep2.4ie">/li>uli> t precisionfrexmpfcisio aloncep3.1de">/li>uli> t precisiongf /li>uli> t precisiongf /li>uli> t precisiongf 2exp>< with aloncep3.0deg sequence ofw 75naarytpresenisiongf exp>< with al/vationsnp>eexp>< with shstode> vail>&rs via a eac wel/vame="Fopmpfr_t x; mpfr_init (x); … mpfr#tween isiongf exp isiongf 2expamp>’, &l/vg usp_pderent f eesseeouworki

N>mpfroncep2.xlthe Mncep3.xather c tabl value is tgf exp>< withdex-mp&l/li>uli> t precisiong/li>uli> t precisionj0mp with, t precisionj1mp with o, lt precisionj>mp with aloncep2.3 s">/li>uli> t precisionlgamma>< with aloncep2.3 s">/li>uli> t precisionli2mpcisios aloncep2.4ie">/li>uli> t precisiontintmpfr>/li>uli> t precisionwin;mpcisios aloncep2.4ie">/li>uli> t precisionmud>nmp with aloncep2.4ie">/li>uli> t precisionN, x);mpcisios aloncep2.4ie">/li>uli> t precisionpfr_sqr < with aloncep2.4ie">/li>uli> t precisionpfgulau>p>< with aloncep3.0de">/li>uli> t precisiono,ma memquo>< with aloncep2.3 s">/li>uli> t precisionsf dinner-by-be t gatlsq/sa)de">/li>uli> t precisionsf /li>uli> t precisionsf 2exp>< with aloncep3.0de">/li>uli> t precisionsf < with aloncep3.0de">/li>uli> t precisionsf sdl>mp with aloncep2.3 s">/li>uli> t precisionsdl>bi < with aloncep2.3 s">/li>uli> t precisionsdnhtcosh < with aloncep2.4ie">/li>uli> t precisionsnN, x);mpcisioso, lt precisionsN, x);mpcisios aloncep2.4ie">/li>uli> t precisionsub>nmp with aloncep2.4ie">/li>uli> t precisionu/li>uli> t precisionvasN, x);mpcisio, t precisionvfN, x);mpcisio, t precisionvN, x);mpcisio, t precisionvsN, x);mpcisioso, lt precisionvsnN, x);mpcisios aloncep2.4ie">/li>uli> t precisiony0mp with, t precisiony1mp with o, lt precisiony>mp with aloncep2.3 s">/li>uli> t precisionzvsubmpcisios aloncep3.1de">/li>u/uum"><">

, PrevioR,mnvRounding Related Functions, Up: Rrmatted-Output-Fy="u" rel="up"APImCionatibilityl   [Index]

Chnly)Rounding Retted Output Functions <6.3 Chnly)Rrmatted-Outprint">p>Tsp.se>rint a se_hnly)d uo; sponcep2.2. Chnly)e etn;allect mayO TS 1866ofp_pderwof tenkis ocifoncekp>eer, run agaimstlnd,ract oncekp>eewer), ahrdescinbe Fbed idex-mp&lua>Fuli> t precisioncheok_only)o withs_hnly)d aloncep2.3 2lthe Mncep2.4ieIdtegatvhger Yw 75lost) w 75/vationslypleft uenhnly)ddeg se s whagoy wnar>, il. ec< diasepracticet(t re hat varioncep wit w 75l. ec/li>uli> t precisiongf (s from indettinatorserir>roa o, lt precisiongf argtegerde">/li>uli> t precisiongf e=(s fr /li>uli> t precisiongf argteger i75 is an id ng usppoogramesent f eeseeouworki

N>mpf oncep2.xlthe 3.xarinttablt r, Cp_pderreturnt precisiongf op>nrintNoncR>3.0,tgutf>int

NoncR>2.x="ele">mpfr_t x; mpfr_init (x); … mpfr N>mol ? isiongf ’, &lsqOt is gfract >, d,Note se>rintNoncR>2.x,tgutf>in

NoncR>3.0="example">mpfr_t x; mpfr_init (x); … mpfr N>mol ? isiongf ’, &lsqPcrt theiepde ther cocaC lt precisiongf m. roundong> m tablt mpfriveun op>mpfr_t x; mpfr_init (x); … mpfr N>mol ? ’, &lsqAlive> cov>opi round>f ... els)o withs_tn;bthusedriundput ohrtar eplditionag>op>&r0 whfv=(s fr uli> t precisiongf exp>< with _hnly)d aloncep3.0deIal/vationsnoncekp>e=(s fr 2exp>< with aloncep3.0,tgutfpresenisiongf exp>< with shstode> vail>&rs fInrcionatibility>-1as n ie">/li>uli> t precisionstrtofro withs_hnly)d aloncep2.3 1lthe Mncep2.4ieg sew 75actlagoy angugsfixletucetegatepde er, tdirdocu/dl>ot/sa did quo;matchd nButf>mpfrwerer_hnly)d al, ,vodreaemorepl he fdful esTS 186d ng rinen p< diive v

ouertdirIn cas0bmpcisiosInrIn cas0xmpal repan fixd nDtia able.er the codt>thes_tn; in>,vodral,ptionag sdl> (suitr tia werer/vationslypaihe nu)de">/li>uli> t precisionstrtofro withs_hnly)d aloncep3.0deg sequence of in/a> p62 (nolihnly)esis varifract ca sh)d nNdfe:i


nrngnupacrte Fbasr in ;ronnerdontrolop, aloncep2.3 1lthe ="#Fh, ;ronne 01danrngnupacrte Fbasr y/li>uli> t precisionsubnhreftiz o withs_hnly)d aloncep3.1ieg sew 75actlagoy o,gardn F.9.angugsfixd TgatIn cascriptsubnhreftiz o with /dd>ot/sa upontroncep3.0d0 didhquo;_hnly)s mays frsi Ial/arteculau, urndidhquo;se>rins mayren>/li>uli> t precisionu/li>u/uum"><">
  ns, Previoame m Chnly)eartl-Functions" accesskey=Chnly)Rounding Related Functions, Up:   [Index]

R,mnv <6.4 R,mnvp>matted-Oult precis
/ndompfcisio o, lt precision>/ndom2mpcisios a secien o,mnvegaimst oncep3.0 orin"#Fh)de(Tariquence olt precis
/ndompfcisio adtcientde whcnal aetucetr ideaC loncep2.2.0, o, lt precision>/ndom2mpcisiosetucetMncep2.4i0.)ex-mp&l">
, Up:   [Index]

ame m-Chnly)etted Output Functions <6.5 ame m Chnly)earrint">p>mInfnsbeseckqafC++itioni(ws, variode hins may vail>&ility>
es xclvariDocu/dl>)d nYounrayltablt ee/li>uli> Listpuo; ohs,lioeaer mo>, r>e igs r,ap tsiroa f strup>ohshipl isvar modifuc/dippor mtegatoodifu V>eN ideaC lfpfrixclvaria, xcipodhaup>ohstxclvar Docu/dl>i( de>deditsia, xcipodhaup>ohs, iteitfh Thfewer td thfpfr), unl &nhtary6bu-etwe yourf thevai/li>uli> Stat 6uo; ecifxclvariaublign e/li>uli> Pwhenrvdtall r t copyrie mh>dticesmde&l/li>uli> Adddn < ppoopatat 6copyrie mh>dtice f styoustmodifuc/dippo ndjacewiontrol ooen dticesie">/li>uli> In sta , immsdiat>op9 o; spt dtices,f licewsee>dtice mpfi01dtor,aublicepermf&nmsa dintabltarioodifu FV>endumFbed ide">/li>uli> Pwhenrvdtioftnar>licewsee>dtice tariqull lisis6iSacsil s er, heprer_diCfv’s licewsee>dticeie">/li>uli> In sta danrngalivee Fcopy /li>uli> Pwhenrvdtt 6Enp> ohs, u r aublign e 6Enp> ,tcrsat 6uoe ntat 01dvarip> ohs, u riaublign i s mpfrn uo;ivsnT> e/li>uli> Pwhenrvdtt ny,nmpfrn 4- variDocu/dl>nh &nntbiarT copmsxclvariDocu/dl>,eer, dikewise t id stan tionsnp>ew 75btwedeond ng n . Younraylouttr> /ptworkiloc/dippFh streworkitnar>w 75/ublign F.t deaC lfoustyeausmbefemorr thDocu/dl>ii, elf,5oaeiter thoriein/l aublign e/li>uli> F 6Enp> h”sIne“Deduc/dippo”, Pwhenrvd variT> , r>n 6all r t subhro, /s deduc/dipponmpfrn th=/li>uli> Pwhenrvdtall r t Invhat l>iSacsil ssxclvariDocu/dl>, ngalivee Fioftntn 6nnumbes s varieprevaldl>eamorquo;cpl ce> /li>uli> Delafer tyrs 6Enp> h”d nSuitraes rayl>intbthin sta di mtegatoodifu FV>e/li>uli> Dof>intr

ceb;bthEnp> h”sIn eouconflicttinat> N tyrInvhat l>nS de">/li>uli> PwhenrvdtatyrW rrvlty>Discla mtes.">/li>u/oum">

Idtegaioodifu FV>es si s npp< foc >-e r iqlagifyr s Sehe tary Sacsil t o, lepltaimhquceat ,eyounrayl/ttyoust sioes mvhat l>d ngoodorvais, udd>tn iSacsil si mtegatoodifu FV>edticeieg ce> &rYounraylodddnrs 6Enp> h”,f;ronnerdoiteepltaims d,ras hagutfendoesa/dl>hpudtyoustoodifu FV>ehpudtpeen revhew s var ir thevx fh T cient ppron debysan organiz/dippFahrtariaup>ohit cov>itweenttomaxdeda ntandardde/samp>&rYounraylodddnrpaabag xdedupontrfpfriwordst.9.anFr nt-Cfvenhpmade by)erayifneeenp> yd nIfmr thDocu/dl>ialnputy in sta d avcovdehvrev-e&qlt rmade bytt y yourarriactturndddn fract;agutfyounraylreplaceer tholre,- ,lio;explicit permf&nmsa f thevarian tionsnaublign &rTmayaup>oh(s) iorquonbp r seLicewse mpfrepermf&nmsa dintabltarirc> y d stor vo &hertnIn /dd>yfendoesa/dl>xdedaayioodifu FV>euli> COMBINING DOCUMENTS p>&rYounraylepmbinorr thDocu/dl>i

Noracttdocu/dl> 64habnve 6all iSacsil ssxclall iSacsil ssxclyour cimbinodioorkie dtice,f revar yourpwhenrvdtall r tircW rrvlty>Discla mtes.">/amp>&rTmaycimbinodioorki eese niSacsil ssnN -vturlr copyd nIfmr tre ers muliiase Invhat l>iSacsil ss

Note secif>ecifgut called witepltdl> 6unique by addt01da iol oe, l isit, ial/ardl>gases,pvari>ecifxclvarioriein/l aup>oh staublign 6iteknown,5oaeels)N -unique nnumbenitolvaris ce> iSacsil ss mtegatlicewsee>dtice , yourm s6Enp> 6Enp> s6Enp> h”, er, atyrs s6Enp> s6Enp> h.” x-mp&l/li>uli> COLLECTIONS OF DOCUMENTS p>&rYounraylmakodrecoll 6epli reoracttdocu/dl>< bu-etwedegn N -vturlrscopmsvar shin sta di m egatepll ,h;ronnerdon r iyourse>rins mayrussn ebatimucopytif thesuitraeepll ,her, dissinbu e ir>indinnelag,f refe>rins m seLicewse6ial9ll ebatimucopytdex-mp&l/li>uli> AGGREGATION WITH INDEPENDENT WORKS p>&rAts oni(amal pofpegr,Docu/dl>ioaeitsrdeniv cov>si

Noracttse/arat " reon epnrddl> iocu/dl> 6a volle_eiiin nppop rtrol ooen workt dedote Docu/dl>dex-mp&lp>IdtegaiCfvuc/&rs tolvars< copi s5,ir en iter thDocu/dl>ii’s Civni

ioftn aggergat ,t&qlt < elexclcovdesh ter thDocu/dl>iiuli> TRANSLATION p>&rTign 64. ReplaciiSacsil ss

NoiSacsil si mtaddttoma tolvar oriein/l >eiSacsil sd nYounraylin sta a r< dticet mrtar Docu/dl>,eer, atyrW rrvlty>Discla mtes,h;ronnerdon r iyourocsouin sta rgahoriein/l Eurlignet>eedticet er, discla mtes. nInlias pger< a revarioriein/l >edtice stdiscla mte,evarioriein/l >ean tailiex-mp&lp>Idtnrs 64- variDocu/dl>iis6Enp> h”, “Deduc/dippo”, Ine“H sdIny”net 64) tolPwhenrvd ivsnT> 61)m ode>typicoule r uli> TERMINATION p>&rYounrayl>intcopy,rmodify, publicewsea< stdissinbu envariDocu/dl>igatlsq 75l. r &noy poonnerdoser gn iisnpoia,eer, ode rupouot/coule eveuiaan eyour rie ms gn quon>,vodvariuli> FUTURE REVISIONS OF THIS LICENSE">eFd e Docu/dl>ot/sa Licewse f thevimertolvimed nSuitrnew p>ebe imflar 4- spiri>itolvari when ehttp://www.gnu.org/copmleft/ Outiet-mp&lsqEait t>ees3> 6nnumbeieIdtvariDocu/dl>ints anddshent fal/arteculaus so thed >ee,eyoun>,vodvartrinteed avdraft) bytt < Fd e SoftwarttFonndationd nIfmr thDocu/dl>iinttts anysa p>eed avdraft) bytt < Fd e SoftwarttFonndationiet-mp>/li>u/oum"> ADDENDUM_003a-Hne-to-Use-Tm s-LicewsetFor-Your-Docu/dl>sed Output Functionnpp< foxtA.1 ADDENDUM:nHne dinUse(Tm seLicewse6Fearrint">p>Tintablta seLicewse6ial9s ocu/dl>iyoun>,vodwof ten,v n sta >scopy rintdticet j yeau yourh>. Permf&nmsa irimrvltedpeoucopm,ndissinbu en gn Fd e Docu/dl>ot/sa Licewse,FV>eeNnotInvhat l>iSacsil s, notFr nt-Cfv 6enp> ot/sa Licewse''dex-m’, &">sqIfmyoun>,vodInvhat l>iSacsil s, Fr nt-Cfv...Trevsd”ulinor

Notis:ex-mp&l"#Rounding-smrNote Invhat l>iSacsil sibttlistpt eirce> ,r

st < Fd nt-Cfvlist,rer, op>Note Back-Cfvlistdex-m’, &">sqIfmyoun>,vodInvhat l>iSacsil sv

ouerCfv 6xclvaripl="e,Fmarge egoseetwo live> cov>sitbi ui ir t itlatoman&rIclyour docu/dl>Gen>&l">

x">Index]tted Output2ounding-un so thedioCintlsqunteger-r2m">t>&rs>ns"); &helsummary-lettde"el="index">Index]_cp_lettde-Aed b>AIndex]_cp_lettde-Bed b>BIndex]_cp_lettde-Ced b>CIndex]_cp_lettde-Eed b>EIndex]_cp_lettde-Fed b>FIndex]_cp_lettde-Ged b>GIndex]_cp_lettde-Ied b>IIndex]_cp_lettde-Led b>LIndex]_cp_lettde-Med b>MIndex]_cp_lettde-Oed b>OIndex]_cp_lettde-Ped b>PIndex]_cp_lettde-Red b>RIndex]_cp_lettde-Sed b>SIndex]_cp_lettde-Ted b>TIndex]_cp_lettde-Ued b>Ut>&rs"); &hel="Inden/td>n/tr>Futr>ns"> x">Index]_cp_lettde-AedA Outn/td>n/tr>Futr>n/td>oncepIwiteface Outn/tr>Futr>n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>- mpfr_risedAss ba/dl>afatted-Output:n/td>-Fmpfr_risedAss ba/dl>amatted-Outputn/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-BedB Outn/td>n/tr>Futr>n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-CedC Outn/td>n/tr>Futr>n/td>- mpfr_risedCpmbinod enttoIS z/dippeer, ass ba/dl>afatted-Output:n/td>-Fmpfr_risedCpmbinod InttoIS z/dippeer, Ass ba/dl>amatted-Outputn/tr>Futr>n/td>n/tr>Futr>n/td>-oncedCpm/atibilityi

Nonctput:n/td>-oncedCpm/atibilityi

Nonctputn/tr>Futr>n/td>n/tr>Futr>n/td>eeeen/tr>Futr>n/td>n/tr>Futr>n/td>Custom iwiteface Out:n/td>Custom Iwiteface Outn/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-EedE Outn/td>n/tr>Futr>n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-cedF Outn/td>n/tr>Futr>n/td>mari Euetic- mpfr_risedF

xari Eueticafatted-Output:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mcpm/arissas- mpfr_risedF

xcpm/arissasafatted-Output:n/td>n/tr>Futr>n/td>m mpfr_risedF

xfatted-Output:n/td>oncepIwiteface Outn/tr>Futr>n/td>minInt-er,-oueIntm mpfr_risedF

xinInte reoueIntefatted-Output:n/td>n/tr>Futr>n/td>moueIntm mpfr_risedF

xoueIntefatted-Output:n/td>n/tr>Futr>n/td>tel=" firs>fatted-Output:n/td>oncepIwiteface Outn/tr>Futr>n/td>tel=" firs> so thtput:n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-G">Gn/td>n/tr>Futr>n/td>ot/sa-LicewselaaNU>Fd e Docu/dl>ot/sa Licewseartl:n/td>ot/sa-LicewselaaNU>Fd e Docu/dl>ot/sa Licewseartln/td>n/tr>Futr>n/td>ot/sa-LicewsettedaNU>Fd e Docu/dl>ot/sa Licewseartl:n/td>ot/sa-LicewselaaNU>Fd e Docu/dl>ot/sa Licewseartln/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-I">In/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>irsmax_ttput:n/td>n/tr>Futr>n/td>irstypeu.htput:n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-L">Ln/td>n/tr>Futr>n/td>libmpfrtput:n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-M">Mn/td>n/tr>Futr>n/td>m mpfr_risedMiscellaneous f

xfatted-Output:n/td>n/tr>Futr>n/td>mpfr.htput:n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-O">On/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-P">Pn/td>n/tr>Futr>n/td>n/tr>Futr>n/td>oncepIwiteface Outn/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-RioRn/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-S">Sn/td>n/tr>Futr>n/td>n/tr>Futr>n/td>stdarg.htput:n/td>n/tr>Futr>n/td>stdirs.htput:n/td>n/tr>Futr>n/td>stdio.htput:n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-T">Tn/td>n/tr>Futr>n/td>Ternary ISuetput:n/td>n/tr>Futr>n/tr>Futr>ns"> x">Index]_cp_lettde-U">Un/td>n/tr>Futr>n/td>uirsmax_ttput:n/td>n/tr>Futr>n/tr>Fu/t>&rs>">t>&rs>ns"); &helsummary-lettde"el="index">Index]_cp_lettde-Aed b>AIndex]_cp_lettde-Bed b>BIndex]_cp_lettde-Ced b>CIndex]_cp_lettde-Eed b>EIndex]_cp_lettde-Fed b>FIndex]_cp_lettde-Ged b>GIndex]_cp_lettde-Ied b>IIndex]_cp_lettde-Led b>LIndex]_cp_lettde-Med b>MIndex]_cp_lettde-Oed b>OIndex]_cp_lettde-Ped b>PIndex]_cp_lettde-Red b>RIndex]_cp_lettde-Sed b>SIndex]_cp_lettde-Ted b>TIndex]_cp_lettde-Ued b>U

]Index], Up:   [Index]

Fmpfr_ri-er,-Typex]tted Output2ounding-un so thedioFmpfr_rirer, Typeunteger-r2m">t>&rs>ns"); &helsummary-lettde"el="indeFmpfr_ri-er,-Typex]_fn_lettde-Med b>Mt>&rs"); &hel="Inden/td>n/tr>Futr>ns"> Fmpfr_ri-er,-Typex]_fn_lettde-MedMn/td>n/tr>Futr>n/td>mpfr_abstput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_acostput:n/td>n/tr>Futr>n/td>mpfr_acoshtput:n/td>n/tr>Futr>n/td>mpfr_addtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_add_dtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_add_qtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_add_sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_add_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_add_ztput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_agmtput:n/td>n/tr>Futr>n/td>mpfr_aitput:n/td>n/tr>Futr>n/td>mpfr_asintput:n/td>n/tr>Futr>n/td>mpfr_asinhtput:n/td>n/tr>Futr>n/td>mpfr_asN, x)ftput:n/td>n/tr>Futr>n/td>mpfr_atantput:n/td>n/tr>Futr>n/td>mpfr_atan2tput:n/td>n/tr>Futr>n/td>mpfr_atanhtput:n/td>n/tr>Futr>n/td>mpfr_buildopt_d thmal_ptput:n/td>n/tr>Futr>n/td>mpfr_buildopt_gmpinternals_ptput:n/td>n/tr>Futr>n/td>mpfr_buildopt_tls_ptput:n/td>n/tr>Futr>n/td>mpfr_buildopt_tune_ias tput:n/td>n/tr>Futr>n/td>mpfr_can_ronndtput:n/td>n/tr>Futr>n/td>mpfr_cbrttput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_ceiltput:n/td>n/tr>Futr>n/td>mpfr_check_rvly)tput:n/td>n/tr>Futr>n/td>mpfr_cleautput:n/td>n/tr>Futr>n/td>mpfr_cleaustput:n/td>n/tr>Futr>n/td>mpfr_cleau_divby0tput:n/td>n/tr>Futr>n/td>mpfr_cleau_ervly)flagtput:n/td>n/tr>Futr>n/td>mpfr_cleau_flagstput:n/td>n/tr>Futr>n/td>mpfr_cleau_inexflagtput:n/td>n/tr>Futr>n/td>mpfr_cleau_nanflagtput:n/td>n/tr>Futr>n/td>mpfr_cleau_fvtput:n/td>n/tr>Futr>n/td>mpfr_cleau_gn tput:n/td>n/tr>Futr>n/td>mpfr_cmptput:n/td>n/tr>Futr>n/td>mpfr_cmpabstput:n/td>n/tr>Futr>n/td>mpfr_cmp_dtput:n/td>n/tr>Futr>n/td>mpfr_cmp_ftput:n/td>n/tr>Futr>n/td>mpfr_cmp_ldtput:n/td>n/tr>Futr>n/td>mpfr_cmp_qtput:n/td>n/tr>Futr>n/td>mpfr_cmp_sitput:n/td>n/tr>Futr>n/td>mpfr_cmp_si_2exptput:n/td>n/tr>Futr>n/td>mpfr_cmp_uitput:n/td>n/tr>Futr>n/td>mpfr_cmp_ui_2exptput:n/td>n/tr>Futr>n/td>mpfr_cmp_ztput:n/td>n/tr>Futr>n/td>mpfr_c-Out_catalantput:n/td>n/tr>Futr>n/td>mpfr_c-Out_eulertput:n/td>n/tr>Futr>n/td>mpfr_c-Out_log2tput:n/td>n/tr>Futr>n/td>mpfr_c-Out_pitput:n/td>n/tr>Futr>n/td>mpfr_c-pys batput:n/td>n/tr>Futr>n/td>mpfr_costput:n/td>n/tr>Futr>n/td>mpfr_coshtput:n/td>n/tr>Futr>n/td>mpfr_cottput:n/td>n/tr>Futr>n/td>mpfr_cothtput:n/td>n/tr>Futr>n/td>mpfr_csctput:n/td>n/tr>Futr>n/td>mpfr_cschtput:n/td>n/tr>Futr>n/td>mpfr_custom_get_exptput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>mpfr_custom_get_kihetput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>mpfr_custom_get_s baifuc/hetput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>mpfr_custom_get_s z)tput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>mpfr_custom_entttput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>mpfr_custom_entt_settput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>mpfr_custom_movetput:n/td>Custom Iwiteface Outn/tr>Futr>n/td>once_DECL_INITtput:n/td>n/tr>Futr>n/td>mpfr_digammatput:n/td>n/tr>Futr>n/td>mpfr_dimtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_divtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_divby0_ptput:n/td>n/tr>Futr>n/td>mpfr_div_2exptput:n/td>-oncedCpm/atibilityi

Nonctputn/tr>Futr>n/td>mpfr_div_2sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_div_2uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_div_dtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_div_qtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_div_sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_div_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_div_ztput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_d_divtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_d_subtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_einttput:n/td>n/tr>Futr>n/td>mpfr_eqtput:n/td>-oncedCpm/atibilityi

Nonctputn/tr>Futr>n/td>mpfr_equal_ptput:n/td>n/tr>Futr>n/td>mpfr_ervly)flag_ptput:n/td>n/tr>Futr>n/td>mpfr_erftput:n/td>n/tr>Futr>n/td>mpfr_erfctput:n/td>n/tr>Futr>n/td>mpfr_exptput:n/td>n/tr>Futr>n/td>mpfr_exp10tput:n/td>n/tr>Futr>n/td>mpfr_exp2tput:n/td>n/tr>Futr>n/td>mpfr_expm1tput:n/td>n/tr>Futr>n/td>mpfr_fac_uitput:n/td>n/tr>Futr>n/td>mpfr_fits_ensmax_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_sirs_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_slong_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_sshors_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_uensmax_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_uirs_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_ulong_ptput:n/td>een/tr>Futr>n/td>mpfr_fits_ushors_ptput:n/td>een/tr>Futr>n/td>mpfr_floortput:n/td>n/tr>Futr>n/td>mpfr_fmatput:n/td>n/tr>Futr>n/td>mpfr_fmodtput:n/td>n/tr>Futr>n/td>mpfr_fmstput:n/td>n/tr>Futr>n/td>mpfr_fN, x)ftput:n/td>n/tr>Futr>n/td>mpfr_fractput:n/td>n/tr>Futr>n/td>mpfr_free_iachetput:n/td>n/tr>Futr>n/td>mpfr_free_strtput:n/td>een/tr>Futr>n/td>mpfr_frexptput:n/td>een/tr>Futr>n/td>mpfr_gammatput:n/td>n/tr>Futr>n/td>mpfr_get_dtput:n/td>een/tr>Futr>n/td>mpfr_get_d thmal64tput:n/td>een/tr>Futr>n/td>mpfr_get_d fauls_prectput:n/td>n/tr>Futr>n/td>mpfr_get_d fauls_ronndotput:n/td>n/tr>Futr>n/td>mpfr_get_d_2exptput:n/td>een/tr>Futr>n/td>mpfr_get_emaxtput:n/td>n/tr>Futr>n/td>mpfr_get_emax_maxtput:n/td>n/tr>Futr>n/td>mpfr_get_emax_mintput:n/td>n/tr>Futr>n/td>mpfr_get_emintput:n/td>n/tr>Futr>n/td>mpfr_get_emin_maxtput:n/td>n/tr>Futr>n/td>mpfr_get_emin_mintput:n/td>n/tr>Futr>n/td>mpfr_get_exptput:n/td>n/tr>Futr>n/td>mpfr_get_ftput:n/td>een/tr>Futr>n/td>mpfr_get_flttput:n/td>een/tr>Futr>n/td>mpfr_get_ldtput:n/td>een/tr>Futr>n/td>mpfr_get_ld_2exptput:n/td>een/tr>Futr>n/td>mpfr_get_patchestput:n/td>n/tr>Futr>n/td>mpfr_get_prectput:n/td>n/tr>Futr>n/td>mpfr_get_s tput:n/td>een/tr>Futr>n/td>mpfr_get_sjtput:n/td>een/tr>Futr>n/td>mpfr_get_strtput:n/td>een/tr>Futr>n/td>mpfr_get_uitput:n/td>een/tr>Futr>n/td>mpfr_get_ujtput:n/td>een/tr>Futr>n/td>empfr_get_ >etput:n/td>n/tr>Futr>n/td>mpfr_get_ztput:n/td>een/tr>Futr>n/td>mpfr_get_z_2exptput:n/td>een/tr>Futr>n/td>mpfr_grandomtput:n/td>n/tr>Futr>n/td>mpfr_grean requal_ptput:n/td>n/tr>Futr>n/td>mpfr_grean r_ptput:n/td>n/tr>Futr>n/td>mpfr_hypottput:n/td>n/tr>Futr>n/td>mpfr_inexflag_ptput:n/td>n/tr>Futr>n/td>mpfr_inf_ptput:n/td>n/tr>Futr>n/td>mpfr_entttput:n/td>n/tr>Futr>n/td>mpfr_entt2tput:n/td>n/tr>Futr>n/td>mpfr_enttstput:n/td>n/tr>Futr>n/td>mpfr_entts2tput:n/td>n/tr>Futr>n/td>mpfr_entt_settput:n/td>n/tr>Futr>n/td>mpfr_entt_set_dtput:n/td>n/tr>Futr>n/td>mpfr_entt_set_ftput:n/td>n/tr>Futr>n/td>mpfr_entt_set_ldtput:n/td>n/tr>Futr>n/td>mpfr_entt_set_qtput:n/td>n/tr>Futr>n/td>mpfr_entt_set_sitput:n/td>n/tr>Futr>n/td>mpfr_entt_set_strtput:n/td>n/tr>Futr>n/td>mpfr_entt_set_uitput:n/td>n/tr>Futr>n/td>mpfr_entt_set_ztput:n/td>n/tr>Futr>n/td>mpfr_enp_strtput:n/td>n/tr>Futr>n/td>mpfr_integde_ptput:n/td>n/tr>Futr>n/td>mpfr_j0tput:n/td>n/tr>Futr>n/td>mpfr_j1tput:n/td>n/tr>Futr>n/td>mpfr_jatput:n/td>n/tr>Futr>n/td>mpfr_lessequal_ptput:n/td>n/tr>Futr>n/td>mpfr_lessgrean r_ptput:n/td>n/tr>Futr>n/td>mpfr_less_ptput:n/td>n/tr>Futr>n/td>mpfr_lgammatput:n/td>n/tr>Futr>n/td>mpfr_li2tput:n/td>n/tr>Futr>n/td>mpfr_lngammatput:n/td>n/tr>Futr>n/td>mpfr_logtput:n/td>n/tr>Futr>n/td>mpfr_log10tput:n/td>n/tr>Futr>n/td>mpfr_log1ptput:n/td>n/tr>Futr>n/td>mpfr_log2tput:n/td>n/tr>Futr>n/td>mpfr_maxtput:n/td>n/tr>Futr>n/td>mpfr_mintput:n/td>n/tr>Futr>n/td>mpfr_min_prectput:n/td>n/tr>Futr>n/td>mpfr_modftput:n/td>n/tr>Futr>n/td>mpfr_multput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_2exptput:n/td>-oncedCpm/atibilityi

Nonctputn/tr>Futr>n/td>mpfr_mul_2sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_2uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_dtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_qtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_mul_ztput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_nanflag_ptput:n/td>n/tr>Futr>n/td>mpfr_nan_ptput:n/td>n/tr>Futr>n/td>mpfr_negtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_nextabovetput:n/td>n/tr>Futr>n/td>mpfr_nextbelowtput:n/td>n/tr>Futr>n/td>mpfr_nexttowardtput:n/td>n/tr>Futr>n/td>mpfr_numb r_ptput:n/td>n/tr>Futr>n/td>mpfr_out_strtput:n/td>n/tr>Futr>n/td>mpfr_fvtput:n/td>n/tr>Futr>n/td>mpfr_powtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_pow_sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_pow_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_pow_ztput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_prec_ronndtput:n/td>n/tr>Futr>n/td>mpfr_prec_ttput:n/td>n/tr>Futr>n/td>mpfr_N, x)ftput:n/td>n/tr>Futr>n/td>mpfr_N, x)_rnd_modetput:n/td>n/tr>Futr>n/td>mpfr_rec_sqrttput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_regular_ptput:n/td>n/tr>Futr>n/td>mpfr_reldifftput:n/td>-oncedCpm/atibilityi

Nonctputn/tr>Futr>n/td>mpfr_rematput:n/td>n/tr>Futr>n/td>mpfr_remquotput:n/td>n/tr>Futr>n/td>mpfr_rinttput:n/td>n/tr>Futr>n/td>mpfr_rint_ceiltput:n/td>n/tr>Futr>n/td>mpfr_rint_floortput:n/td>n/tr>Futr>n/td>mpfr_, x)_ronndtput:n/td>n/tr>Futr>n/td>mpfr_, x)_tratttput:n/td>n/tr>Futr>n/td>mpfr_rnd_ttput:n/td>n/tr>Futr>n/td>mpfr_roottput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_,onndtput:n/td>n/tr>Futr>n/td>mpfr_sectput:n/td>n/tr>Futr>n/td>mpfr_sechtput:n/td>n/tr>Futr>n/td>mpfr_settput:n/td>n/tr>Futr>n/td>mpfr_sets batput:n/td>n/tr>Futr>n/td>mpfr_set_dtput:n/td>n/tr>Futr>n/td>mpfr_set_d thmal64tput:n/td>n/tr>Futr>n/td>mpfr_set_d fauls_prectput:n/td>n/tr>Futr>n/td>mpfr_set_d fauls_ronndotput:n/td>n/tr>Futr>n/td>mpfr_set_divby0tput:n/td>n/tr>Futr>n/td>mpfr_set_emaxtput:n/td>n/tr>Futr>n/td>mpfr_set_emintput:n/td>n/tr>Futr>n/td>mpfr_set_ervly)flagtput:n/td>n/tr>Futr>n/td>mpfr_set_exptput:n/td>n/tr>Futr>n/td>mpfr_set_ftput:n/td>n/tr>Futr>n/td>mpfr_set_flttput:n/td>n/tr>Futr>n/td>mpfr_set_inexflagtput:n/td>n/tr>Futr>n/td>mpfr_set_inftput:n/td>n/tr>Futr>n/td>mpfr_set_ldtput:n/td>n/tr>Futr>n/td>mpfr_set_naatput:n/td>n/tr>Futr>n/td>mpfr_set_naaflagtput:n/td>n/tr>Futr>n/td>mpfr_set_fvtput:n/td>n/tr>Futr>n/td>mpfr_set_prectput:n/td>n/tr>Futr>n/td>mpfr_set_prec_rawtput:n/td>-oncedCpm/atibilityi

Nonctputn/tr>Futr>n/td>mpfr_set_qtput:n/td>n/tr>Futr>n/td>mpfr_set_sitput:n/td>n/tr>Futr>n/td>mpfr_set_si_2exptput:n/td>n/tr>Futr>n/td>mpfr_set_sjtput:n/td>n/tr>Futr>n/td>mpfr_set_sj_2exptput:n/td>n/tr>Futr>n/td>mpfr_set_strtput:n/td>n/tr>Futr>n/td>mpfr_set_uitput:n/td>n/tr>Futr>n/td>mpfr_set_ui_2exptput:n/td>n/tr>Futr>n/td>mpfr_set_ujtput:n/td>n/tr>Futr>n/td>mpfr_set_uj_2exptput:n/td>n/tr>Futr>n/td>mpfr_set_ua nrflowtput:n/td>n/tr>Futr>n/td>mpfr_set_ztput:n/td>n/tr>Futr>n/td>mpfr_set_zerotput:n/td>n/tr>Futr>n/td>mpfr_set_z_2exptput:n/td>n/tr>Futr>n/td>mpfr_sbatput:n/td>n/tr>Futr>n/td>mpfr_s babtttput:n/td>n/tr>Futr>n/td>mpfr_sintput:n/td>n/tr>Futr>n/td>mpfr_sinhtput:n/td>n/tr>Futr>n/td>mpfr_sinh_coshtput:n/td>n/tr>Futr>n/td>mpfr_sin_costput:n/td>n/tr>Futr>n/td>mpfr_si_divtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_si_subtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_snpr x)ftput:n/td>n/tr>Futr>n/td>mpfr_spr x)ftput:n/td>n/tr>Futr>n/td>mpfr_sqrtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sqrttput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sqrt_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_strtofrtput:n/td>n/tr>Futr>n/td>mpfr_subtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_subn&quolizetput:n/td>n/tr>Futr>n/td>mpfr_sub_dtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sub_qtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sub_sitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sub_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sub_ztput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_sumtput:n/td>n/tr>Futr>n/td>mpfr_swaptput:n/td>n/tr>Futr>n/td>mpfr_ttput:n/td>n/tr>Futr>n/td>mpfr_taatput:n/td>n/tr>Futr>n/td>mpfr_taahtput:n/td>n/tr>Futr>n/td>mpfr_tratttput:n/td>n/tr>Futr>n/td>mpfr_ui_divtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_ui_powtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_ui_pow_uitput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_ui_subtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr>n/td>mpfr_ua nrflow_ptput:n/td>n/tr>Futr>n/td>mpfr_ua&q nred_ptput:n/td>n/tr>Futr>n/td>mpfr_urandomtput:n/td>n/tr>Futr>n/td>mpfr_urandombtput:n/td>n/tr>Futr>n/td>mpfr_vaspr x)ftput:n/td>n/tr>Futr>n/td>MPFR_VERSIONtput:n/td>n/tr>Futr>n/td>MPFR_VERSION_MAJORtput:n/td>n/tr>Futr>n/td>MPFR_VERSION_MINORtput:n/td>n/tr>Futr>n/td>MPFR_VERSION_NUMtput:n/td>n/tr>Futr>n/td>MPFR_VERSION_PATCHLEVELtput:n/td>n/tr>Futr>n/td>MPFR_VERSION_STRINGtput:n/td>n/tr>Futr>n/td>mpfr_vfpr x)ftput:n/td>n/tr>Futr>n/td>mpfr_vpr x)ftput:n/td>n/tr>Futr>n/td>mpfr_vsnpr x)ftput:n/td>n/tr>Futr>n/td>mpfr_vspr x)ftput:n/td>n/tr>Futr>n/td>mpfr_y0tput:n/td>n/tr>Futr>n/td>mpfr_y1tput:n/td>n/tr>Futr>n/td>mpfr_yatput:n/td>n/tr>Futr>n/td>mpfr_zero_ptput:n/td>n/tr>Futr>n/td>mpfr_zetatput:n/td>n/tr>Futr>n/td>mpfr_zeta_uitput:n/td>n/tr>Futr>n/td>mpfr_z_subtput:n/td>BtwtcxAri Eueticamatted-Outputn/tr>Futr> n/tr>Fu/table>Futable>utr>na class="summary-lett r"el="indeFatted-Omer,-Type-Ia na_fn_lett r-M-IMtput ="Inde n/tr>u/table>F Fu/html>