The canard à l'orange release.
MPFR 3.1.0 requires GMP 4.1.0 or higher (GMP 4.2.3 or higher is recommended).
The MPFR 3.1.0 source can be downloaded in the following archive formats:
MPFR is also available via third-party packages and ports.
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:
patch -N -Z -p1 < path_to_patches_filefrom the source directory. The -N option allows the patch command to ignore patches already applied. The -Z option sets the modification time of the patched files from time stamps given in the patch file, thus avoiding the need of some development utilities (such as autoconf); this may generate a
Not setting timewarning for the PATCHES file, but you can safely ignore it. Under Microsoft Windows, in addition to the above options, you may need the --binary option (this depends whether the end-of-lines have been converted when you downloaded the patch file). Also note that the --dry-run option does not work if the cumulative patch has some file listed several times.
svn co svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1 mpfr-3.1In this case, as said on the Gforge page, you should read the README.dev file for details on how to build MPFR. Also note that the branch may contain additional minor fixes.
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:
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."%.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".See the tracker and the BUGS file.
mpfr_urandom and mpfr_urandomb functions
now return identical values on processors with different word size (assuming
the same random seed, and since the GMP random generator
does not depend itself on the word size, cf
http://gmplib.org/list-archives/gmp-devel/2010-September/001642.html).mpfr_add_one_ulp and mpfr_sub_one_ulp
macros (which are obsolete and no more documented) will be removed in a
future release.mpfr_sqr and mpfr_div
functions using Mulders' algorithm. As a consequence, other functions using
those routines are also faster.mpfr_printf, etc.)
with %Rg and similar.mpfr_buildopt_gmpinternals_p,
mpfr_buildopt_tune_case, mpfr_frexp,
mpfr_grandom and mpfr_z_sub.make check(so that running the tests under valgrind or gdb is easier).
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.
MPFR 3.1.0 has been successfully compiled and checked on the following platforms: