The dinde aux marrons release.
MPFR�4.0.0 requires GMP�5.0 or higher.
Note: the bug-fix release MPFR 4.0.1 is available. Please upgrade!
Warning! Due to the fact that
TLS support is now detected
automatically, the MPFR build can be incorrect on some
platforms (compiler or system bug). Indeed,
the
TLS implementation of some compilers/platforms is buggy,
and MPFR cannot detect every problem at configure time.
Please run make check
to see if your build is affected.
If you get failures, you should try the --disable-thread-safe
configure option to disable TLS and see if this solves
these failures. But you should not use an MPFR library
with TLS disabled in a multithreaded program (unless
you know what you are doing).
The MPFR�4.0.0 source can be downloaded in the following archive formats:
Each tarball is signed by Vincent Lef�vre. This can be verified using the DSA key ID 980C197698C3739D; this key can be retrieved with:
gpg --recv-keys 980C197698C3739D
or by downloading it from https://www.vinc17.net/pgp.html. The key fingerprint is:
07F3 DBBE CC1A 3960 5078 094D 980C 1976 98C3 739D
The signatures can be verified with:
gpg --verify file.asc
You should check that the key fingerprint matches.
MPFR is also available via third-party packages and ports.
See the tracker and the BUGS file.
mp_set_memory_functions
function to change the allocators must first call the new function mpfr_mp_memory_cleanup
in all threads where MPFR is potentially used; this new function is currently equivalent to mpfr_free_cache
. The reason is that the way memory allocation is done by MPFR has changed (again), so that the current GMP allocators are used (since for some applications, the old allocators may become invalid). Note: Freeing the caches like this might have a performance impact on some particular applications; if this is an issue, this could be handled for a future MPFR version.--enable-mini-gmp
configure option (experimental).MPFR_PREC_MIN
is now 1, with rounding defined as in the errata of IEEE 754-2008 and in the following IEEE 754 revision (ties rounded away from zero).mpfr_free_cache2
.MPFR_RNDF
(faithful rounding).mpfr_fpif_export
and mpfr_fpif_import
to export and import numbers in a floating-point interchange format, independent both on the number of bits per word and on the endianness.mpfr_fmodquo
to return the low bits of the quotient corresponding to mpfr_fmod.mpfr_flags_clear
, mpfr_flags_set
, mpfr_flags_test
, mpfr_flags_save
and mpfr_flags_restore
to operate on groups of flags.mpfr_set_float128
and mpfr_get_float128
to convert from/to the __float128
type (requires --enable-float128
and compiler support).mpfr_buildopt_float128_p
and mpfr_buildopt_sharedcache_p
.mpfr_rint_roundeven
and mpfr_roundeven
, completing the other similar round-to-integer functions for rounding to nearest with the even-rounding rule.mpfr_round_nearest_away
to add partial emulation of the rounding to nearest-away (as defined in IEEE 754-2008).mpfr_nrandom
and mpfr_erandom
to generate random numbers following normal and exponential distributions respectively.mpfr_fmma
and mpfr_fmms
to compute ab+cd and ab−cd.mpfr_rootn_ui
, similar to mpfr_root
, but agreeing with the rootn function of the IEEE 754-2008 standard.mpfr_log_ui
to compute the logarithm of an integer, mpfr_gamma_inc
for the incomplete Gamma function.mpfr_beta
for the Beta function (incomplete, experimental).mpfr_get_q
to convert a floating-point number into rational.mpfr_dump
function is now described in the manual; its output format has slightly changed.mpfr_eint
function now returns the value of the E1/eint1 function for negative argument.mpfr_set_exp
function changed, as it could easily yield undefined behavior in some cases (this modifies both the API and the ABI).mpfr_urandom
, the next random state no longer depends on the current exponent range and the rounding mode. The exceptions due to the rounding of the random number are now correctly generated, following the uniform distribution.mpfr_grandom
and mpfr_root
are deprecated and will be removed in a future release.mpfr_sum
, which now works in all cases (the old one could take all the memory and/or crash with inputs of different magnitudes in case of huge cancellation or table maker's dilemma). The sign of an exact zero result is now specified, and the return value is now the usual ternary value. Note that the position of const
in the mpfr_sum
prototype has been fixed (the manual was correct); user code should not be affected.mpfr_add_one_ulp
and mpfr_sub_one_ulp
removed. The mpfr_next* functions should be used instead.mpz_t
pool, which aims to avoid the overhead of memory allocation, in particular.mpfr_free_pool
.--enable-assert=none
to avoid checking any assertion.--enable-decimal-float
configure option no longer requires --with-gmp-build
, and support for decimal floats is now automatically detected by default (similarly for support for __float128
).mpfr_add
, mpfr_sub
, mpfr_mul
, mpfr_div
and mpfr_sqrt
when all operands have the same precision and this precision is less than twice the number of bits per word, e.g., less than 128 on a 64-bit computer.mpfr_set_d
and mpfr_get_d
).mpfr_log1p
and mpfr_atanh
for small arguments.mpfr_const_euler
function (contributed by Fredrik Johansson), in the computation of Bernoulli numbers (used in mpfr_gamma
, mpfr_li2
, mpfr_digamma
, mpfr_lngamma
and mpfr_lgamma
), in mpfr_div
, in mpfr_fma
and mpfr_fms
.--enable-assert
or --enable-assert=full
configure option is used with GCC; mpfr_get_str
now sets the NaN flag on NaN input and the inexact flag when the conversion is inexact. For a full list, see detailed list on the MPFR�3.1.6 page and the same section for any previous 3.1.x version (follow the links in the Changes... sections).make checkwould check an installed, compatible MPFR library found in LD_LIBRARY_PATH instead of the one that has been built with
make.
make check-gmp-symbols, mainly for binary distributions, to check that MPFR does not use GMP internal symbols (experimental).
MPFR 4.0.0 has been successfully compiled and checked on the following platforms: