GNU MPFR version 3.1.0 (released on 3 October 2011)

[download] [documentation] [bugs] [changes] [platforms] [timings]

The canard à l'orange release.

MPFR 3.1.0 requires GMP 4.1.0 or higher (GMP 4.2.3 or higher is recommended).

Download

The MPFR 3.1.0 source can be downloaded in the following archive formats:

MPFR is also available via third-party packages and ports.

Documentation

Bugs

The bugs listed below have been fixed (latest update: 2011-11-28). The patches are distributed under the same license as this version of MPFR, that is, the GNU Lesser General Public License (GNU Lesser GPL), version 3 or later.

The following instructions are for Linux and may be similar for other operating systems. You can apply the patches in several ways:

With the first two ways, the PATCHES file is modified, so that one can know what patches have been applied, using the new mpfr_get_patches function. Moreover a suffix is added to the version string, but note that for practical reasons, not all the files where the version appears are patched; thus one can also track applied patches with the MPFR_VERSION_STRING macro (header) and the mpfr_get_version function (library). However, if some patches are not applied or if patches are applied in a different order, then the patch command will fail to update some chunks, so that the suffix is not always reliable for patches.

Note: These patches are in unified diff format and some vendors' patch commands cannot deal with them; in this case, please use GNU patch (it may already be installed on your system, e.g. as /usr/local/bin/patch or gpatch).

Fixed bugs, with patches:

  1. The MPFR_UNLIKELY internal macro definition for GCC is incorrect. The compiled code can be affected when a limb is larger than a long (e.g. with some ABI's, such as mode32 on PowerPC). The MPFR_UNLIKELY definition has been incorrect since it was introduced in MPFR 2.1.0, but problems started to be visible only in MPFR 3.1.0 with all assertions checked (the MPFR code is normally written to work with the incorrect definition). This bug is fixed by the mpfr_unlikely patch.
  2. On some platforms, such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR library is already installed in the corresponding lib directory, the tests are linked against this old MPFR library instead of the one that has just been compiled. This problem due to autoconf/automake is fixed by the lib-search-path patch.
  3. The formatted output functions (mpfr_*printf) may output/return an incorrect string when the value is rounded up to the next power of 10 (for instance, 999.99999... printed with "%.20RNg" may give "100" instead of "1000"). This bug, which has always been present (since these functions were introduced in MPFR 2.4.0), is fixed by the vasprintf patch (which also provides testcases). Note: MPFR 3.1.0 also introduced a regression in some other cases, such as -9.996 in 32 bits printed with "%.2Rg".
  4. The testsuite (make check) fails when MPFR is built against GMP 4.1.* (which is a very old version). This is not a bug in the MPFR library, but in the tests, which do not take into account the fact that the default random number generator of GMP changed between versions 4.1 and 4.2. This problem is fixed by the gmp41compat patch, which also updates the MPFR manual to mention this change (in the API Compatibility chapter).

See the tracker and the BUGS file.

Changes from versions 3.0.* to version 3.1.0

Note: The mpfr_subnormalize implementation up to MPFR 3.0.0 did not change the flags. In particular, it did not follow the generic rule concerning the inexact flag (and no special behavior was specified). The case of the underflow flag was more a lack of specification.

Platforms Known to Support MPFR

MPFR 3.1.0 has been successfully compiled and checked on the following platforms:

Back to the MPFR page.