The boudin aux pommes release, patch level 1.
MPFR 3.0.1 requires GMP 4.1.0 or higher (GMP 4.2.3 or higher is recommended).
This is the latest version of the 3.0 branch, which is no longer supported (major bugs will be fixed for some time as patches only). Please upgrade to MPFR 3.1.0 (or higher, when new versions are released): latest MPFR release.
The MPFR 3.0.1 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-05-09). 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.0 mpfr-3.0In 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
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_asin
may give an
incorrect result on +1 and -1. This bug is fixed by the
asin_exprange patch
(which also provides a testcase).mpfr_rec_sqrt
function can have undefined
behavior due to the call of mpn_add_1
or mpn_sub_1
(from GMP) with a null size, which is not allowed.
The fourth argument of mpn_add_1
or mpn_sub_1
(i.e. the value that should have been added or subtracted)
is here also 0, so that the consequences are limited. In practice, with
the current GMP version, this yields a small buffer
overflow (1 limb, i.e. 32 bits or 64 bits), as shown by
valgrind, with the possible consequences: a crash, or
memory corruption (very unlikely) if another process or thread modifies
the limb at the same time (as in this context, the value is first read
then written back by GMP). This bug has always been
present since the introduction of the mpfr_rec_sqrt
function in MPFR 2.4.0. It is fixed by the
rec_sqrt-carry patch.mpfr_atan
function calls
mpfr_check_range
on the unrounded result (no longer allocated)
instead of the rounded result. Consequence of this bug: possible incorrect
or invalid result and/or incorrect flags if the unrounded result or rounded
result is not in the current exponent range. Or possibly worse if the
memory used by the unrounded result is modified before the return of the
function. This bug has been present since MPFR 2.1.0
(exceptions were not supported before). It is fixed by the
atan-expo-range patch.mpfr_exp_2
and mpfr_exp_3
internal functions. The consequence is a failure in this test if this
happens. This is a bug only in the tests, not in the library itself. It
is fixed by the texp-zero patch.The following bugs are fixed in the 3.1 branch (for the future MPFR 3.1.0):
mpz_t
, mpq_t
or
mpf_t
do not handle underflows and overflows correctly.mpfr_exp
(when the target precision is
less than MPFR_EXP_THRESHOLD
) on hard-to-round cases, which can
take several minutes.Other bugs: please see the tracker and the BUGS file.
Microsoft Windows users who wish to build a DLL with GCC 4.6 and later should look at this thread.
Bug fixes (detailed list on the MPFR 3.0.0 page).
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.0.1 has been successfully compiled and checked on the following platforms: