The andouillette sauce moutarde release, patch level 2.
MPFR 2.4.2 requires GMP 4.1.0 or higher (GMP 4.2.3 or higher is recommended).
This is the latest version of the 2.4 branch, which is no longer supported (major bugs will be fixed for some time as patches only). Please upgrade to MPFR 3.0.0 (or higher, when new versions are released): latest MPFR release.
Warning! GCC 4.4.0 miscompiles
MPFR 2.4.2. This is detected by
make check
(failures in tget_z
and tpow_all). Please use a different compiler;
note that only GCC 4.4.0 is affected; the
bug has been fixed in GCC 4.4.1.
Warning! On Solaris, MPFR 2.4.2 can be
miscompiled with GCC. This is in fact a
bug in the Solaris memset
function, which has been fixed
by Sun in October 2009. For more information about this bug, see this
bug report
and this
thread.
See also information
about the fix.
The MPFR 2.4.2 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: 2010-01-11). 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 2.1 or later. Note that patches from the trunk (not listed on this page) are under the GNU Lesser GPL version 3 or later, thus may be backported only by the authors or the FSF without a license upgrade.
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 with this cumulative patch.
svn co svn://scm.gforge.inria.fr/svn/mpfr/branches/2.4 mpfr-2.4In 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:
mpfr_sin_cos
function is called on
the minimum positive number or its opposite allowed by the current
MPFR implementation (in the largest exponent range)
and the rounding mode is toward zero or equivalent, then an underflow
occurs but the underflow flag is not set. This bug in fixed by the
sin_cos_underflow patch (which also
provides additional tests of mpfr_sin_cos
to trigger this
bug).Bugs that are fixed in the 2.4 or 3.0 branch (and later):
mpfr_exp_2
function, called by
mpfr_exp
when the target precision is less than some
threshold, can suffer from a buffer overflow.mpfr_out_str
function is incorrect on NaN and infinities. Moreover output errors
are not handled, and if such an error occurs, the return value is
incorrect (it should have been 0).The following bug in the subtraction code
is fixed in the 3.0 branch (and later);
a patch
has been backported for older MPFR versions.
In some special cases, the subtraction code can return a
result that is not correctly rounded (both mpfr_add
and
mpfr_sub
functions call this code, depending on the signs
of the inputs). It can possibly yield undefined behavior, as the result
may not be normalized (if MPFR had been built with
the --enable-assert configure option, an assertion failure
occurs in such a case). This bug cannot occur if the input and output
precisions of the subtraction are the same, but it can also be triggered
by functions that call mpfr_add
or mpfr_sub
with different precisions, e.g. by mpfr_fma
and mpfr_fms
. All the MPFR versions
up to version 3.0.0 are affected.
Other bugs: please see the tracker and the BUGS file.
Other problems, which are not MPFR bugs:
intmax_t
and uintmax_t
are not defined. This is due to a heuristic
used by MPFR (in the mpfr.h header file)
to guess whether <stdint.h> has been included or not.
As this heuristic may fail with some C++ libraries,
it
will be disabled for C++ compilers in MPFR 3. In
the mean time, several workarounds can be used to avoid this problem:
intmax_t
and uintmax_t
before mpfr.h is included. As Boost defines them in the
std namespace, this can be done with:
using std::intmax_t; using std::uintmax_t;but make sure that Boost headers (or <cstdint> if your platform has it) are included before.
intmax_t
and uintmax_t
types.mpfr_get_z_exp
,
mpfr_strtofr
, mpfr_get_str
and
formatted output functions.tcmp_ld
test to really test the
long double
.mpfr_init_cache
(unused and undocumented
function).__GMP_CC
/ __GMP_CFLAGS
).make check(failures in tget_z and tpow_all).
MPFR 2.4.2 has been successfully compiled and checked on the following platforms: