The andouillette sauce moutarde release, patch level 1.
MPFR 2.4.1 requires GMP 4.1.0 or higher (GMP 4.2.3 or higher is recommended).
Warning! On Solaris, MPFR 2.4.1 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.
Note: the bug-fix release MPFR 2.4.2 is available. Please upgrade!
The MPFR 2.4.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: 2009-03-13). 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_fmod
,
mpfr_remainder
and mpfr_remquo
) round
the result before changing its sign when x is negative.
The consequence is that in non-symmetric rounding modes
(GMP_RNDD
and GMP_RNDU
), the result
is rounded in the wrong direction. This bug is fixed in the
remainder-neg patch.void *
for %p in printf
format. Most (if not all) C implementations should not be affected
by these missing casts.unsigned long
, a shift count is incorrect in
mpfr_zeta_ui
. In such a case, the practical consequence
is a possible performance loss. An incorrect result is theoretically
possible (e.g. if the compiler optimizes out parts of code
with undefined behavior), but unlikely in practice. This bug is fixed
in the zeta_ui-shift patch.Some other bugs have been found and fixed both in the trunk and in the 2.4 branch. The ones that may affect the user are listed below. The corresponding patches are not published (these bugs will be fixed in the upcoming 2.4.2 release), but the changeset numbers (in the 2.4 branch) are given for the reference.
MPFR_EXP_THRESHOLD
to a very small
value in mparam.h (e.g. by tuning
MPFR).long double
corresponds to the x87
extended-precision format, mpfr_get_ld
does not correctly
handle the subnormal range (possible assertion failure) and the maximum
exponent value is too small by one.mpfr_atan
has the following problems:
mpfr_atan2
calls mpfr_atan
, thus is
affected too.mpfr_fmod
, which can return an
incorrect result, probably frequently. For more information, see the
explanations
by Eric Veach, who reported the bug.mpfr_exp_t
does not have the same size as a long int
,
mpfr_get_decimal64
can behave incorrectly.mpfr_coth
is wrong on ±0.dereferencing type-punned pointer will break strict-aliasing ruleswith GCC 4.4 (possibly due to possible memory alignment problems). It is now replaced by a union.
wint_t
in
va_arg
. This is due to a non-conforming definition of
wint_t
, thus not a bug in MPFR, but
the following workaround avoids this problem.long double
implements the traditional x87 extended precision,
then the conversion by mpfr_get_ld
of a MPFR
number corresponding to a subnormal is incorrect.mpfr_frac
function can return incorrect results, and
even results in a bad format.mpfr_sin_cos
fails to
round some cases correctly (rare, except in low precision).mpfr_cos
when the reduced argument
is zero.mpfr_li2
when the argument
is near 0.mpfr_cache
can be incorrect (in practice, with a
probability 1/2). This affects all the constants that use
mpfr_cache
(mpfr_const_catalan
,
mpfr_const_euler
, mpfr_const_log2
and mpfr_const_pi
).__GMP_CC
/ __GMP_CFLAGS
information and GMP has been compiled with a compiler
somewhat incompatible with GCC (this can be the default on
some machines). The reason is that the configure script detects
GCC before the compiler from __GMP_CC
is chosen
and does some settings related to GCC (due to some autoconf
macro), such as selecting GCC-specific options.Other bugs: please see the tracker and the BUGS file.
Note: Under HP-UX, you may need to install
MPFR before running make check
. Indeed the
libtool scripts included in the MPFR tarball
(based on libtool 2.2) seem to have a bug: for the tests, the
install directory (which may already contain an older MPFR
version) has the precedence over the build directory.
mpfr_snprintf
and mpfr_vsnprintf
(buffer overflow).mpfr_inits
, mpfr_inits2
,
mpfr_clears
and MPFR_DECL_INIT
have been in
the public API
since MPFR 2.4.0.MPFR 2.4.1 has been successfully compiled and checked on the following platforms: