GNU MPFR version 2.4.0 (released on 26 January 2009)

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

The andouillette sauce moutarde release.

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

Note: the bug-fix release MPFR 2.4.1 is available. Please upgrade!


The MPFR 2.4.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: 2009-02-25). 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:

  1. The printf length modifiers hh and ll (new in C99) are not checked at configure time. The consequence is that the tprintf and tfprintf tests will fail if one of these modifiers is not supported by the system (such as alpha-OSF1-V5). This is not a bug in the MPFR library itself though, and these failures may safely be ignored (but other potential failures may not be detected). This problem is fixed in the printf-hh-ll patch.

    Note that acinclude.m4 is patched, but its timestamp is not updated (if the -Z patch option is given as recommended above) to avoid the unnecessary rebuild of some files by additional development tools (not always available).

  2. The mpfr_snprintf and mpfr_vsnprintf functions do not behave correctly. Moreover they can yield a buffer overflow: a null byte is written one position after the expected null byte, which can be just after the end of the buffer. This bug is fixed in the mpfr_snprintf patch, which also includes testcases.
    [Changeset: 6000]

Other bugs: please see the tracker and the BUGS file.

Changes from versions 2.3.* to version 2.4.0

Platforms Known to Support MPFR

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

Note: the test coverage of make check is about 96.7% lines of code.

Back to the MPFR page.