We have just updated the GNU Free Documentation License used by the GNU MPFR manual from version 1.2 to version 1.3, which was published in 2008 (for both the master branch and the 4.2 branch). In practice, this does not change anything for MPFR users. Additional details.
My short paper An Emacs-Cairo scrolling bug due to floating-point inaccuracy, which I'll present at the ARITH-2024 conference (31st IEEE Symposium on Computer Arithmetic) in Málaga, is available on my website and on HAL. Abstract:
We study a bug that we found in the GNU Emacs text editor when built against the Cairo graphics library. We analyze both the Emacs code and the Cairo code, and we suggest what can be done to avoid unexpected results. This involves a particular case with a computation that can be reduced to the equivalent floating-point expression ((1/s)·b)·s, where s and b are small positive integers such that b < s and the basic operations are rounded to nearest. The analysis takes into account the values of s and b that can occur in practice, and the suggestions for workarounds must avoid handling this particular case in a separate branch or breaking the structure of the Cairo library (so that just returning b is not possible).
I've also put a small video on my website, showing the effect of this bug. What I did for this video is to go to the end of the file, then only backward scrolling with the mouse wheel. It's difficult to see what's going on, but this is precisely because of this bug.
The GNU MPFR 4.2.1 library (fondue savoyarde, patch level 1) has been released (announce).
Patches 10 to 12 of GNU MPFR 4.2.0 have been available in the bugs section of the MPFR 4.2.0 page since July 17. The most important one is patch 11, which fixes a bug in the mpfr_inp_str
function.
Patches 5 to 9 of GNU MPFR 4.2.0 are available in the bugs section of the MPFR 4.2.0 page. I put 3 patches (5 to 7) at the end of last week and I've just put 2 new patches (8 and 9). These last 2 patches fix the following bugs:
8. The mpfr_compound_si
function can take a huge amount of memory and time in some cases (when the argument x is a large even integer and xn is represented exactly in the target precision) and does not correctly detect overflows and underflows.
9. MPFR can crash when a formatted output function is called with %.2147483648Rg in the format string. For instance: mpfr_snprintf (NULL, 0, "%.2147483648Rg\n", x);
Patches 1 to 4 of GNU MPFR 4.2.0 are available in the bugs section of the MPFR 4.2.0 page. The first and third patches fix tests of MPFR and do not concern the library itself. The second patch (associated commit) fixes an infinite loop in the mpfr_ui_pow_ui
function in case of overflow; the mpfr_log10
function, which uses mpfr_ui_pow_ui
, is affected by this bug. The fourth patch (associated commit) fixes the mpfr_rec_sqrt
function in some cases that are very hard to round (in practice, the precision of the input needs to be much larger than the one of the destination): such cases may yield a stack overflow due to many small allocations in the stack; a consequence of this fix is that this function should now be much faster in these particular cases.
The GNU MPFR 4.2.0 library (fondue savoyarde) has been released (announce).
New functions:
mpfr_cosu
, mpfr_sinu
, mpfr_tanu
, mpfr_acosu
, mpfr_asinu
, mpfr_atanu
, mpfr_atan2u
;
mpfr_cospi
, mpfr_sinpi
, mpfr_tanpi
, mpfr_acospi
, mpfr_asinpi
, mpfr_atanpi
, mpfr_atan2pi
;
mpfr_log2p1
, mpfr_log10p1
, mpfr_exp2m1
, mpfr_exp10m1
, mpfr_compound_si
, mpfr_fmod_ui
, mpfr_powr
, mpfr_pown
, mpfr_pow_uj
, mpfr_pow_sj
, mpfr_rootn_si
(mpfr_pown
is actually a macro defined as an alias for mpfr_pow_sj
).
The GNU MPFR 4.1.1 library (épinards à la crème, patch level 1) has been released: bug fixes and improved manual formatting.
The GNU MPFR 4.1.1 release candidate is available. The main changes are bug fixes (in particular for macros implementing functions) and improved manual formatting, by using a recent texinfo.tex file (2022-09-14.01).
mpfr_rootn_si
in the Development Version of GNU MPFRI have just implemented the mpfr_rootn_si
function in the development version of GNU MPFR. It provides the rootn function of the IEEE 754 standard (which appeared in the 2008 revision). It completes the mpfr_rootn_ui
function, which was providing rootn for non-negative values of n only.
As announced last month in its mailing-list, the GNU MPFR sources have been hosted at https://gitlab.inria.fr/mpfr (Inria GitLab) since 2021-10-15, after InriaForge closed. There are now two separate Git repositories:
https://gitlab.inria.fr/mpfr/mpfr for the MPFR sources (some information on the GNU MPFR website);
https://gitlab.inria.fr/mpfr/misc for miscellaneous files, such as those for the MPFR website and additional tools (in particular, not tied to an MPFR version).
Not all the work related to this migration has been completed yet.
On InriaForge, we were using Subversion as the version control system, so that the single repository, composed of the sources (trunk/branches/tags) and some special misc directory, had to be converted to two Git repositories. I had first done an attempt with git svn, but an analysis of the obtained Git repository for the sources revealed important issues, caused mainly by the following particularities of the Subversion repository.
Some files and directories (for the directories, these were branches) were replaced (on purpose), i.e. deleted, then re-added with a different history (possibly new), either in the same commit or later. The git svn tool was considering that these were the same files or branches, thus was generating a completely incorrect history (as a consequence, the diff
implied by the generated commit was also completely incorrect, even though the resulting contents were correct).
Before Subversion, CVS was used as the version control system, and the CVS repository was converted to Subversion with cvs2svn on 2005-10-24. Unfortunately, cvs2svn had bugs (or was it CVS itself?), and generated an incorrect history for tags (we did not notice this issue at that time, but anyway, it is not clear that we could have done anything to avoid it), in particular with some files coming from the associated branch and others coming from the trunk.
So I decided to use Eric S. Raymond's excellent reposurgeon tool to fix everything, but also to add some metadata, such as the Subversion revisions to each commit message (since such revisions are sometimes referenced), together with the affected branch (since Git cannot retrieve this information). For this repository conversion with reposurgeon, I found various issues (some of them also due to the particularities of the MPFR's Subversion repository, and all of them fixed rather quickly) and did some merge requests. Some files and scripts I wrote for this conversion can be found in the mpfr-conversion.tar.xz archive. Note that there was only one operation between what are now two repositories: Subversion revision 12528, where a file was moved from /misc to /trunk/tools; I checked that it was correctly handled by reposurgeon (but of course, in the Git repositories, this just appears as an addition on one side and as a deletion on the other side, without any link between these two generated operations).
Patch 12 of GNU MPFR 4.1.0 is available in the bugs section of the MPFR 4.1.0 page. It fixes some issues with the mpfr_get_str_ndigits
function.
Patches 10 and 11 of GNU MPFR 4.1.0 are available in the bugs section of the MPFR 4.1.0 page. The main bug, fixed by patch 10 (among potential compilation failures in unusual cases): the mpfr_set
macro (which, by default, is used in place of the function) evaluates its second argument twice.
Due to power outage, the server hosting mpfr.org will be switched off from Tuesday 23 February 2021, 17:00 CET (16:00 UTC) to Wednesday 24 February 2021, 18:00 CET (17:00 UTC), except unpredictable incident. Only the mpfr.org website will be affected. The MPFR mailing-list and InriaForge will still work.
Patches 8 and 9 of GNU MPFR 4.1.0 are available in the bugs section of the MPFR 4.1.0 page.
Patches 1 to 7 of GNU MPFR 4.1.0 are available in the bugs section of the MPFR 4.1.0 page.
Happy New Year to everyone!
Due to power outage, the server hosting mpfr.org will be switched off from Friday 22 January 2021, 16:00 CET (15:00 UTC) to Monday 25 January 2021, 10:00 CET (09:00 UTC), except unpredictable incident. Only the mpfr.org website will be affected. The MPFR mailing-list and InriaForge will still work.
The GNU MPFR 4.1.0 release candidate is available.
Note that the default CFLAGS
value for GCC uses an option that has been introduced in GCC 4.1 (released in 2006). So, if you want to build MPFR with a GCC version less than 4.1, you need to provide an explicit CFLAGS
. This issue will be fixed in the final release.
Patches 2 to 6 of GNU MPFR 4.0.2 are available in the bugs section of the MPFR 4.0.2 page. The main ones fix underflow/overflow issues that could be visible with the following functions: mpfr_set_ui_2exp
, mpfr_set_si_2exp
, mpfr_set_uj_2exp
, mpfr_set_sj_2exp
, mpfr_fmma
, mpfr_fmms
, mpfr_fma
, mpfr_fms
.
The mpfr.org server is currently down (amongst other virtualized servers, hosted at the same place). This is due to unexpected issues following a maintenance concerning the NAS that was done yesterday (2020-02-11 at 17:00 UTC). We still do not know when the server will be back online.
You can still obtain the GNU MPFR source code from the GNU FTP site and from InriaForge.
[Update] The server is now up.
J'ai écrit une nouvelle page web sur Neopolis, jeu créé par Ben Kaltenbaek, Roland Lamidieu et Lucas Odion, et lancé à Lyon en mars 2019 sous le nom Metropolis, avant d'être renommé en Neopolis en juillet.
J'y donne des informations en tant que joueur aux 5 parties qui ont eu lieu à Lyon, dont celle en cours depuis le début du mois.
J'y ai aussi ajouté une section sur un bug d'affichage, pour lequel j'ai trouvé une explication probable, liée à une mauvaise méthode de calcul en virgule flottante (les valeurs particulières affectées par ce bug correspondent à mon explication).
I have a new paper, written with Jean-Michel Muller: Accurate Complex Multiplication in Floating-Point Arithmetic. It has been accepted at the 26th IEEE Symposium on Computer Arithmetic (ARITH 26), which will take place on 10–12 June 2019 in Kyoto, Japan. Abstract:
We deal with accurate complex multiplication in binary floating-point arithmetic, with an emphasis on the case where one of the operands in a
double-wordnumber. We provide an algorithm that returns a complex product with normwise relative error bound close to the best possible one, i.e., the rounding unit u.
For testing, comparisons have been done with the naive algorithm in the binary64 (double precision) and binary128 (quadruple precision) formats, and with implementations based on GNU MPFR, on x86_64 and POWER9 machines (the latter is currently the only processor with hardware binary128 support).
The GNU MPFR 4.0.2 library (dinde aux marrons, patch level 2) has been released. In addition to bug fixes, this version corrects the mpfr_get_str
description in the manual in order to follow the historical behavior and GMP's mpf_get_str
function.
The GNU MPFR 4.0.2 release candidate is available.
Patch 14 of GNU MPFR 4.0.1 is available in the bugs section of the MPFR 4.0.1 page. It fixes a bug affecting the mpfr_fmma
and mpfr_fmms
functions in particular cases: in the round-to-nearest mode (MPFR_RNDN
), these functions can round in the wrong direction due to a double rounding in the computation.
Patches 12 and 13 of GNU MPFR 4.0.1 are available in the bugs section of the MPFR 4.0.1 page. They fix bugs in the formatted output functions (mpfr_*printf
):
Patch 12: Possible undefined behavior in case of error: store to null pointer, free of bad pointer, and <stdarg.h> related undefined behavior.
Patch 13: The flags for the P length modifier (mpfr_prec_t argument) are ignored; this includes the sign of the field width when the value is provided in argument (by using an asterisk * in the format string).
Patches 10 and 11 of GNU MPFR 4.0.1 are available in the bugs section of the MPFR 4.0.1 page.
The main issue is that the mpfr_erf
and mpfr_erfc
functions can yield an assertion failure due to the fact that the error bound is computed with the double type and can overflow. This is fixed by patch 11.
Patches 7 to 9 of GNU MPFR 4.0.1 are available in the bugs section of the MPFR 4.0.1 page.
The main issue can occur with the formatted output functions (mpfr_*printf
) when the ' flag is used in a locale where the thousands separator is not empty. In some specific cases (that is, when the integer part is rounded upward to 10 or 100), the generated string can be incorrect and since it is shorter than expected, an incorrect buffer size may be provided to the free
function of the current GMP memory allocator. By default, this size is ignored, but it may matter if the memory allocators have been changed with the mp_set_memory_functions
GMP function, in which case a possible consequence could be memory corruption.
Patches 1 to 6 of GNU MPFR 4.0.1 are available in the bugs section of the MPFR 4.0.1 page. The first one fixes a major bug introduced in MPFR 4.0.0 (in a particular case of addition/subtraction), though most applications are probably not affected. The other ones fix minor bugs, with probably no consequences in practice.
For the users of the Math::MPFR Perl module, note that patch 6 makes a bug appear in version 4.03 of this module (current version at the time of writing – [Update 2018-05-08] A new version of the module is now available).
The GNU MPFR 4.0.1 library (dinde aux marrons, patch level 1) has been released. It fixes some problems of version 4.0.0, which I did not announce here: in particular, a bug in the mpfr_div_ui
function, which was present since the introduction of mpfr_div_ui
at the very beginning of the development of MPFR in 1999. But as of version 4.0.0, this bug was also affecting the mpfr_div
function.
These versions 4.0.* contain many changes compared to versions 3.1.* (GNU MPFR 3.1.0 had been released in October 2011).
The GNU MPFR 4.0.0 release candidate is available.
By the way, I did my first MPFR commit 17 years ago.
Patch 1 of GNU MPFR 3.1.6 is available in the bugs section of the MPFR 3.1.6 page. It fixes the conversion functions mpfr_get_ld
, mpfr_get_si
, mpfr_get_ui
, mpfr_get_sj
, mpfr_get_uj
and mpfr_get_z
when called with a very reduced exponent range.
The GNU MPFR 3.1.6 library (canard à l'orange, patch level 6) has been released. The changes from version 3.1.5:
Improved MPFR manual.
Bug fixes (detailed list on the MPFR 3.1.5 page and ChangeLog file).
Autotools: Under Linux, make sure that the old dtags (when supported) are used if the LD_LIBRARY_PATH environment variable is defined; otherwise make check
would check an installed, compatible MPFR library found in LD_LIBRARY_PATH instead of the one that has been built with make
.
The GNU MPFR 3.1.6 release candidate has been available for a few days.
Patch 10 of GNU MPFR 3.1.5 is available in the bugs section of the MPFR 3.1.5 page. It fixes incorrect header inclusion introduced by patch 8, in order to get the correct definition of symbols and avoid a link-time error under Microsoft Windows with DLL.
Patch 9 of GNU MPFR 3.1.5 is available in the bugs section of the MPFR 3.1.5 page. It fixes a very important bug for users of platforms with a 32-bit unsigned long (32-bit ABI or Microsoft Windows) for very high precisions: computations in sin_cos.c suffer from overflows in such precisions (more than about 1,000,000 bits) due to the limited size of the unsigned long type. In practice, this introduces an error of up to 2−1019574 approximately, so that the trigonometric functions (mpfr_sin
, mpfr_cos
, mpfr_tan
) and functions that call them can be very inaccurate (limiting the overall accuracy to about one million bits for these functions on such platforms).
Patches 3 to 8 of GNU MPFR 3.1.5 are available in the bugs section of the MPFR 3.1.5 page. The first five fix minor issues and patch 8 fixes some mpf2mpfr.h macros (only users of this header file, used to build GMP/mpf programs with MPFR instead of mpf, may be affected).
I have two new papers that have just been accepted, both related to GNU MPFR.
Correctly Rounded Arbitrary-Precision Floating-Point Summation, to be published in IEEE Transactions on Computers. DOI: 10.1109/TC.2017.2690632 (official link). PDF file on my personal web site (freely downloadable, © IEEE). Abstract:
We present a fast algorithm together with its low-level implementation of correctly rounded arbitrary-precision floating-point summation. The arithmetic is the one used by the GNU MPFR library: radix 2; no subnormals; each variable (each input and the output) has its own precision. We also give a worst-case complexity of this algorithm and describe how the implementation is tested.
Optimized Binary64 and Binary128 Arithmetic with GNU MPFR, written with Paul Zimmermann. Accepted at the 24th IEEE Symposium on Computer Arithmetic (ARITH 24), which will take place on 24–26 July 2017 in London, England. Abstract:
We describe algorithms used to optimize the GNU MPFR library when the operands fit into one or two words. On modern processors, a correctly rounded addition of two quadruple precision numbers is now performed in 22 cycles, a subtraction in 24 cycles, a multiplication in 32 cycles, a division in 64 cycles, and a square root in 69 cycles. We also introduce a new faithful rounding mode, which enables even faster computations. Those optimizations will be available in version 4 of MPFR.
For those who test the GNU MPFR trunk via Subversion on InriaForge:
The tzeta test should no longer fail on most platforms (IEEE 754 machines with default IEEE exception handling).
The tsprintf test still fails (fix in progress). The cause is a major efficiency issue in particular cases (huge precision requested).
Note: Both problems are also present in the released versions, but they have no tests that trigger them.
Patch 2 of GNU MPFR 3.1.5 is available in the bugs section of the MPFR 3.1.5 page. It fixes the following bug. The mpfr_strtofr
function can return an incorrect ternary value in the round-to-nearest mode (MPFR_RNDN
).
Patch 1 of GNU MPFR 3.1.5 is available in the bugs section of the MPFR 3.1.5 page. It fixes the following bug. The formatted output functions (mpfr_*printf
) yield an undefined behavior or assertion failure when a precision less than −1 is given as an argument for the f or F conversion specifier (the given precision should have been ignored).
The GNU MPFR 3.1.5 library (canard à l'orange, patch level 5) has been released. The changes from version 3.1.4:
C++11 compatibility.
Bug fixes (detailed list on the MPFR 3.1.4 page and ChangeLog file).
More tests.
Patches 5 and 6 of GNU MPFR 3.1.4 are available in the bugs section of the MPFR 3.1.4 page. Patch 5 fixes bugs in the mpfr_can_round_raw
internal rounding-test function, used by the mpfr_can_round
public function (in particular, the few MPFR math functions that use this rounding test might be rounded incorrectly). Patch 6 fixes the mpfr_get_ld
function, which did not round correctly in the subnormal range on x86 platforms.
Patch 4 of GNU MPFR 3.1.4 is available in the bugs section of the MPFR 3.1.4 page. It fixes an incompatibility of some programs of the test suite with the C++11 standard (used by default with g++ from GCC 6) and is useful only for those who compile MPFR with such a C++ compiler (instead of a C compiler).
A few days ago, I presented my paper Correctly Rounded Arbitrary-Precision Floating-Point Summation at the 23rd IEEE Symposium on Computer Arithmetic (ARITH 23), which took place from July 10 to July 13, 2016, in Santa Clara, California, USA. The goal of this work was a complete rewrite of the mpfr_sum
function for the next GNU MPFR release (version 4.0.0). Here are links to my article and my slides.
Note that I did some improvements since I wrote the article. The slides are more up-to-date, covering the current mpfr_sum
function (r10503) at this time. The current sum.txt file (r10523) contains more details, but it is still not up-to-date (like the article).
Patch 3 of GNU MPFR 3.1.4 is available in the bugs section of the MPFR 3.1.4 page. It fixes a bug in the subtraction code (addition of two numbers of different signs or subtraction of two numbers of the same sign), which can give an overflow on some very particular case while it should not (see the link for details). It is very unlikely that an application would be affected by the bug.
I discovered this bug while I was reviewing a part of the code to implement unbounded-float support (floating-point numbers with an unbounded exponent range) in order to avoid intermediate overflows for functions like mpfr_fmma
(which computes a·b + c·d) or possibly in the future, polynomial evaluation with correct rounding.
Patches 1 and 2 of GNU MPFR 3.1.4 are available in the bugs section of the MPFR 3.1.4 page. The first one concerns users of the 32-bit Cygwin (under Microsoft Windows). The second one fixes flags setting in functions mpfr_add_ui
and mpfr_sub_ui
; in practice, the only issue is that the NaN flag is not set with a NaN input.
I take the opportunity to point out that it was decided at the MPFR developer meeting of May 23-24 that the next MPFR release will be 4.0.
The GNU MPFR 3.1.4 library (canard à l'orange, patch level 4) has been released. The changes from version 3.1.3: improved manual, bug fixes (detailed list on the MPFR 3.1.3 page and ChangeLog file), and support for thread-safe DLL (shared library) with MinGW (for Microsoft Windows).
Patches 13 to 17 of GNU MPFR 3.1.3 are available in the bugs section of the MPFR 3.1.3 page.
The second GNU MPFR 3.1.4 release candidate is also available.
Patches 6 to 12 of GNU MPFR 3.1.3 are available in the bugs section of the MPFR 3.1.3 page. Consequences of the bugs can be crashes or incorrect results in particular cases. For instance, with GNOME Calculator, computing 2^(1/123456789) triggers a crash with an unpatched MPFR library.
Merry Christmas! For this special occasion (well, actually, not really because I had planned to do this before), I have eventually made the main worst cases for the correct rounding of math functions in double precision (binary64) public. I have also distributed small test programs for the native C functions and the GNU MPFR library, which take such data in input. Everything is accessible from my web page Test of Mathematical Functions of the Standard C Library (see Distribution
).
On my Floating-Point Arithmetic Test Programs web page, I have added a new program to test some optimizations by a C compiler. More precisely, it tests various simple expressions that can lead to transformations by the compiler in order to optimize. Such transformations are valid on the real numbers, but can here be invalid due to special IEEE-754 values (NaN, infinities, signed zeros).
The results can be affected by compiler options related to optimization of floating-point expressions. See an example of use with GCC (details about floating-point with GCC). In errors, y0 is the obtained value and y1 is the expected (correct) value. Note: it is assumed that the volatile
qualifier has the effect to disable the optimizations, otherwise nothing is tested (see the source).
Patch 5 of GNU MPFR 3.1.3 is available in the bugs section of the MPFR 3.1.3 page. It fixes a bug that can lead the mpfr_div
function to return an incorrect result under particular circumstances. However MPFR 3.1.3 is distributed with tuning parameters that cannot trigger this bug.
Patches 1 to 4 of GNU MPFR 3.1.3 are available in the bugs section of the MPFR 3.1.3 page. They fix miscellaneous problems in case of exception (underflow, overflow, division by zero) in some functions (mpfr_lngamma
, mpfr_mul_2si
, mpfr_div_2ui
, mpfr_div_2si
, mpfr_frexp
).
The GNU MPFR 3.1.3 library (canard à l'orange, patch level 3) has been released. The changes from version 3.1.2: better support for Automake 1.13+ (now used to generate the tarball, so that the make check tests are now run in parallel), improved manual and bug fixes (detailed list on the MPFR 3.1.2 page and ChangeLog file).
The GNU MPFR 3.1.3 release candidate is available.
ARITH 22 – 22nd IEEE Symposium on Computer Arithmetic, 22-24 June 2015, Lyon, France. Early registration deadline: 30 April 2015.
My new article On the maximum relative error when computing integer powers by iterated multiplications in floating-point arithmetic co-written with Stef Graillat and Jean-Michel Muller, which will be published in Numerical Algorithms, is available on:
the editor's website (this is the official, final version, but not freely available if your library doesn't have the adequate subscription);
HAL (almost identical to the final version, and freely available).
Note: the version on arXiv is currently an older one.
Abstract:
We improve the usual relative error bound for the computation of xn through iterated multiplications by x in binary floating-point arithmetic. The obtained error bound is only slightly better than the usual one, but it is simpler. We also discuss the more general problem of computing the product of n terms.
Patch 11 of GNU MPFR 3.1.2 is available in the bugs section of the MPFR 3.1.2 page. It fixes a buffer overflow in mpfr_strtofr
due to incorrect GMP documentation for mpn_set_str
about the size of a buffer: announce and discussion – first fix in the GMP documentation. This bug is present in the MPFR versions from 2.1.0 (adding mpfr_strtofr
) to 3.1.2.
Various links:
Call for papers: 22nd IEEE Symposium on Computer Arithmetic (ARITH-22). Deadline for the abstract: October 26, 2014. Deadline for the full paper: November 2, 2014. Conference: June 22-24, 2015, in Lyon, France.
Patches 9 and 10 of GNU MPFR 3.1.2 are available in the bugs section of the MPFR 3.1.2 page. They fix the following bugs.
When a very large number (near the maximum finite one, in absolute value) is divided by a very small number (near the minimum one, in absolute value), an integer overflow occurs in the computation of the exponent of the result, yielding undefined behavior, such as the result 0 instead of infinity.
The vasprintf.c source file contains incorrect assertions, which may fail while the computation is valid; this can occur only when outputting tiny numbers (very small exponents).
Patches 4 to 8 of GNU MPFR 3.1.2 are available in the bugs section of the MPFR 3.1.2 page (patches 4 and 5 are from a few months ago, but patches 6 to 8 were added last night). The main bug is a possibly incorrect rounding with mpfr_exp
, only when the precision is at least a few thousands bits (otherwise the buggy code isn't executed). The last patch fixes an internal compatibility problem with GMP 6 (released two weeks ago) when MPFR is compiled with a particular option (generally not used).
I've just found an error in both formulas on my slide Simple Output about GNU MPFR (there's also an English typo). Three presentations are affected. I have not modified the slides, but I've added errata in the section about my slides.
Note: The GNU MPFR library (code and documentation) was correct.
I and colleagues received the La Recherche award 2013 in the Computer science category, for our article: Peter Kornerup, Vincent Lefèvre [Inria], Nicolas Louvet [Université Lyon 1], and Jean-Michel Muller [CNRS]. On the computation of correctly-rounded sums. IEEE Transactions on Computers, 61(3):289–298, March 2012.
The awards ceremony took place on Tuesday 22 October 2013 at the musée du quai Branly in Paris. The videos, in French, are now available on the official web site.
Links (in French):
Patches 1 to 3 of GNU MPFR 3.1.2 are available in the bugs section of the MPFR 3.1.2 page. The main bug that has been fixed concerns the unsigned mpfr_fits_u*_p class of functions: these functions were returning 0 (doesn't fit
) instead of non-zero (fits
) on negative arguments for which the rounding to an integer in the given rounding mode is 0 (thus a representable rounded value).
I've updated my Sipe mini-library: I've completed the floating-point based implementation and added support for rounding toward zero in the integer based implementation.
On the occasion of the ARITH-21 conference in Austin, Texas, USA, where I presented my Sipe mini-library (previously SIPE) last month, I've created a new web page dedicated to Sipe, which I've just updated. I now provide examples and links to my publications and to my presentation at ARITH-21.
The GNU MPFR 3.1.2 library (canard à l'orange, patch level 2) has been released. The changes from version 3.1.1: bug fixes (detailed list on the MPFR 3.1.1 page) and updated examples to the MPFR 3.x API.
Note: The official tarballs for MPFR up to 3.1.1 are affected by a GNU Automake bug introducing a vulnerability in make distcheck. One of the purposes of this new release is to provide tarballs without this vulnerability.
GNU MPFR 3.1.2 Release Candidate is available (bug fixes).
We have received an announce saying that due to technical maintenance, the computer systems at the Loria will be stopped from Friday, February 8, 2013 at 17:30 CET [16:30 UTC] to Saturday, February 9, 2013 at 18:00 CET [17:00 UTC] (except unpredictable incident). Only the mpfr.org web server will be affected by this downtime (and mail sent to the old @loria.fr address of the MPFR mailing-list). Sorry for the inconvenience.
Moreover, all the MPFR tarballs are affected by a GNU Automake bug introducing a vulnerability in make distcheck; users of this command should read the details here.
Une école thématique à laquelle je vais intervenir (session sur l'arithmétique flottante en précision arbitraire, et plus particulièrement sur GNU MPFR): école Précision et Reproductibilité en Calcul Numérique, Fréjus (centre CAES du CNRS), 25-29 mars 2013.
Date limite d'inscription: 15 février 2013.
[Mise à jour du 2021-06-04: nouvelle URL.]
For a couple of days, it has now been possible to connect to vinc17.net and www.vinc17.net via https, e.g. https://vinc17.net/ or equivalently https://www.vinc17.net/. Note that the certificate is valid only for these two names, so that the connection is completely secure only for these two URL prefixes, not for URL's with vinc17.org (I just don't want to pay for a service that would be identical).
As an InriaForge user, I have received an announce saying that InriaForge will be unavailable on 2012-12-11 from 14:00 to 16:00 CET (13:00 to 15:00 UTC). This will affect the MPFR project pages, the MPFR repository and the issue tracker, but neither the MPFR web site nor the mailing-lists.
For C programmers of numerical codes, here's a status of floating-point related bugs in GCC and the GNU C Library (glibc), at least those I've been interested in (and some of which I reported). I have grouped them into 4 classes.
In relation to the ISO C standard, still not fixed:
Elementary functions, bugs fixed by Joseph Myers and Andreas Jaeger in March/April 2012, except for the last one (still open – [Update: fixed on 2012-11-28]):
GNU C Library bug 2678: pow
returns incorrect results on underflow
GNU C Library bug 3866: pow
(double, double) does not fulfil several of C99's requirements
GNU C Library bug 3976: libm rounding modes do not work correctly for many archs
GNU C Library bug 13658: sincos()
is incorrect for large inputs on x86_64
GNU C Library bug 13852: sincosf()
, sinf()
, cosf()
, tanf()
are incorrect for large inputs on x86
GNU C Library bug 13854: tan()
is incorrect for large inputs on x86_64 and x86
Bugs involving radix conversions, fixed by Joseph Myers in August/September 2012:
GNU C Library bug 13304: fma
, fmaf
, fmal
produce wrong results, still open.
Patches 1 and 2 of GNU MPFR 3.1.1 are available in the bugs section of the MPFR 3.1.1 page. Patch 1 fixes several bugs in the mpfr_get_decimal64
function (available only when MPFR has explicitly been configured with the --enable-decimal-float option). Patch 2 fixes a bug in the mpfr_strtofr
function: its ternary value can be wrong under particular conditions.
The GNU MPFR 3.1.1 library (canard à l'orange, patch level 1) has been released. The changes from version 3.1.0: improved manual and bug fixes (detailed list on the MPFR 3.1.0 page).
We have received an announce saying that due to technical maintenance, the computer systems at the Loria will be stopped from Friday, June 1, 2012 at 17:30 CEST [15:30 UTC] to Saturday, June 2, 2012 at 19:00 CEST [17:00 UTC] (except unpredictable incident). Only the mpfr.org web server will be affected by this downtime (and mail sent to the old @loria.fr address of the MPFR mailing-list).
Sorry for the inconvenience.
An MPFR-MPC developers meeting will take place from 25 to 27 June 2012 in Bordeaux, France. More information.
Patches 9 and 10 of GNU MPFR 3.1.0 are available in the bugs section of the MPFR 3.1.0 page. They fix overflow/underflow related bugs in the mpfr_gamma
function.
The MPFR mailing-lists (the main one and the announce one) will be migrated to a new server on Thursday May 3, 2012 from 9:30 CEST (7:30 UTC) to about 11:30 CEST (9:30 UTC). During this migration period, posted messages will be queued until the new server is operational, and the web interface of the mailing-list server will be unavailable. Once the migration is completed, the web interface will be available at a new address (possibly in addition to the old one?).
Shortly after the migration, the MPFR web server will be updated to reflect these changes.
Patches 7 and 8 of GNU MPFR 3.1.0 are available in the bugs section of the MPFR 3.1.0 page. The first one fixes a problem with very large precisions, close to the theoretical limit implied by the precision type. The second one allows MPFR to be used with GMP's development version (and the future versions from 5.1.0).
Patches 5 and 6 of GNU MPFR 3.1.0 are available in the bugs section of the MPFR 3.1.0 page. They both fix bugs that can occur only when logging is used. Detailed explanations:
When logging is used (note that logging support must have explicitly been enabled in the MPFR build), e.g. with MPFR_LOG_ALL=1
, the program may randomly freeze (observed with dynamic linking), take a lot of memory or have other random behavior. The problem actually occurs in the following functions: mpfr_add_d
, mpfr_add_ui
and mpfr_mul_d
; but mpfr_add_ui
is used by other functions (directly or indirectly). This is due to a typo in an argument for the internal logging macro MPFR_LOG_FUNC
: instead of the variable mpfr_log_prec
(whose value is 6 by default), the function pointer mpfr_get_prec
is used, and it has an arbitrary value. This bug (#13933) is fixed by the logging-freeze patch (patch05).
In the logging system, an incorrect format is used for MPFR_LOG_VAR
. If the logged variable has a huge value, the output has many digits; this can potentially take much memory and disk space. This bug is fixed by the logging-varfmt patch (patch06).
A new SIPE version (48201 2011-12-12 01:47:58Z) is available. It fixes a few bugs against the 2009-11-17 version. This tool is described and partly proved in my new research report: SIPE: Small Integer Plus Exponent [HAL / in my publication list].
Abstract: SIPE (Small Integer Plus Exponent) is a mini-library in the form of a C header file, to perform computations in very low precisions with correct rounding to nearest. The goal of such a tool is to do proofs of algorithms/properties or computations of error bounds in these precisions, in order to generalize them to higher precisions. The supported operations are the addition, the subtraction, the multiplication, the FMA, and miscellaneous comparisons and conversions.
Patch 3 of GNU MPFR 3.1.0 is available in the bugs section of the MPFR 3.1.0 page. It fixes the following bug.
The formatted output functions (mpfr_*printf
) may output/return an incorrect string when the value is rounded up to the next power of 10 (for instance, 999.99999... printed with "%.20RNg" may give "100" instead of "1000"). This bug has always been present (since these functions were introduced in MPFR 2.4.0).
Patch 1 of GNU MPFR 3.1.0 is available in the bugs section of the MPFR 3.1.0 page. It fixes the GCC version of the definition of the MPFR_UNLIKELY
internal macro. The compiled code can be affected when a limb is larger than a long (e.g. with some ABI's, such as mode32 on PowerPC). The MPFR_UNLIKELY
definition for GCC has been incorrect since this macro was introduced in MPFR 2.1.0, but problems started to be visible only in MPFR 3.1.0 with all assertions checked (the MPFR code is normally written to work with the incorrect definition).
The GNU MPFR 3.1.0 library (canard à l'orange) has been released. The changes from the 3.0.* versions:
The MPFR source has been reorganized.
Dropped ansi2knr support.
TLS support is now detected automatically. If TLS is supported, MPFR is built as thread safe by default. To disable TLS explicitly, configure MPFR with --disable-thread-safe.
New --enable-gmp-internals configure option to use GMP's undocumented functions (not from the public API). Note that library versioning is not guaranteed to work if this option is used.
The mpfr_urandom
and mpfr_urandomb
functions now return identical values on processors with different word size (assuming the same random seed, and since the GMP random generator does not depend itself on the word size, cf https://gmplib.org/list-archives/gmp-devel/2010-September/001642.html).
The mpfr_add_one_ulp
and mpfr_sub_one_ulp
macros (which are obsolete and no more documented) will be removed in a future release.
Speed improvement for the mpfr_sqr
and mpfr_div
functions using Mulders' algorithm. As a consequence, other functions using those routines are also faster.
Much faster formatted output (mpfr_printf
, etc.) with %Rg and similar.
The --with-gmp-build configure option can now be used when the GMP source directory and the GMP build directory are different (without having to copy header files manually as before).
New functions mpfr_buildopt_gmpinternals_p
, mpfr_buildopt_tune_case
, mpfr_frexp
, mpfr_grandom
and mpfr_z_sub
New divide-by-zero exception (flag) and associated functions.
The mpfr.h header can be included several times, while still supporting optional functions (see Section Headers and Libraries in the manual).
Updated tuning parameters.
Improved MPFR manual.
MPFR tests: libtool no longer generates wrapper scripts with make check
(so that running the tests under valgrind or gdb is easier).
Bug fixes.
The second GNU MPFR 3.1.0 release candidate is available.
GNU MPFR 3.1.0 Release Candidate is available.
The ISO/IEC/IEEE 60559:2011 standard on floating-point arithmetic, corresponding to the IEEE 754-2008 standard, has been published (stage 60-60, 2011-07-07).
mpfr_min_prec
Note about the GNU MPFR mpfr_min_prec
function: it appeared in version 3.0.0, but wasn't listed in the new functions. I've corrected the GNU MPFR 3.0.0 web page, and both the NEWS file and the MPFR manual for the future MPFR versions.
INRIA is recruiting a graduate engineer for development related to the GNU MPFR library (12-month contract, renewable once). Job description / details on the INRIA website. To be eligible, an engineer must have graduated during the year prior to his recruitment (thus 2010 or 2011).
Application deadline: September 30, 2011.
Patch 4 of GNU MPFR 3.0.1 is available in the bugs section of the MPFR 3.0.1 page. It fixes the following bug in the tests (this is not a bug in the library itself).
The texp test doesn't filter out the value 0 (which can appear with some seeds, set by GMP_CHECK_RANDOMIZE) when comparing the mpfr_exp_2
and mpfr_exp_3
internal functions. The consequence is a failure in this test if this happens.
Patch 2 and patch 3 of GNU MPFR 3.0.1 are available in the bugs section of the MPFR 3.0.1 page. They fix the following problems:
The 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.
The 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).
Patch 1 of GNU MPFR 3.0.1 has been available in the bugs section of the MPFR 3.0.1 page for a couple of weeks. It fixes the following bug, which should probably never occur in user codes: if the exponent range has been reduced such that emax = 1 or 2, mpfr_asin
may give an incorrect result on +1 and -1.
The GNU MPFR 3.0.1 library (boudin aux pommes, patch level 1) has been released. The changes from version 3.0.0: bug fixes (detailed list on the MPFR 3.0.0 page).
We have received an announce saying that the computer systems at the Loria will be stopped from Friday, April 1, 2011 at 18:00 CEST (16:00 UTC) to Monday, April 4, 2011 at 09:00 CEST (07:00 UTC). The mpfr.org web server and the MPFR mailing-list will be affected by this downtime.
As a consequence, the release of GNU MPFR 3.0.1 is postponed to April 4.
Thank you for your understanding.
GNU MPFR 3.0.1 Release Candidate is available (bug fixes).
The announces of my new entries on my blog are now posted on my identi.ca account (with the usual repost to my Twitter account) when the entry is available in English, and only on my Twitter account when the entry is only in French.
Minutes of the MPFR-MPC developers meeting, which took place in Paris on Tuesday 13 and Friday 14 January 2011. GNU MPFR 3.0.1 should be released in a few weeks.
Each time I post a new entry to my blog, an announce is now automatically sent to my Twitter account. This should be the case for this one...
Patch 8 of GNU MPFR 3.0.0 is available in the bugs section of the MPFR 3.0.0 page. Patch 4 introduced two minor problems: First, if the user defines a macro with the same name as some keywords (which is implicitly discouraged), the behavior can be incorrect (compilation failure of the user code, wrong results...); this problem was already there for some other macros. Second, some usual type checking was no longer done; for instance, passing a pointer instead of an integer was no longer regarded as an error at compilation time. This patch fixes these problems. Note however that defining a macro with the name do, while or sizeof is still forbidden, and other restrictions may be added in the future (unless MPFR_USE_NO_MACRO has been defined).
Patches 5 to 7 of GNU MPFR 3.0.0 are available in the bugs section of the MPFR 3.0.0 page.
Patch 5 fixes a bug in the tcan_round test (which can fail, but normal users shouldn't notice failures).
Patch 6 fixes a bug in the subtraction code on some particular cases. This bug has been present in all MPFR versions. The consequence can be incorrect rounding or even undefined behavior. 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
. Applying this patch is highly recommended.
Patch 7 fixes a bug in mpfr_set_ld
, which can occur on very small values. In practice, only platforms with quadruple precision should be affected; but such platforms are not common.
Patch 4 of GNU MPFR 3.0.0 is available in the bugs section of the MPFR 3.0.0 page. It fixes the following problems in the mpfr_cmp_ui
, mpfr_cmp_si
, mpfr_set_ui
and mpfr_set_si
macros for GCC-based compilers:
In the mpfr_cmp_ui
macro for GCC-based compilers, when the second argument is a constant expression with the value 0, the first argument is evaluated twice, making the behavior incorrect when the evaluation of the first argument yields side effects. The mpfr_cmp_si
macro uses mpfr_cmp_ui
, thus is also affected by this bug. Note that though mpfr_cmp_ui
and mpfr_cmp_si
are described as functions, they are also implemented as macros in mpfr.h (except in case of a bug like here, a macro implementation should not introduce a difference in the behavior).
A much less important problem is that the mpfr_cmp_si
and mpfr_set_si
macros for GCC-based compilers (from mpfr.h) can yield warnings when user code is compiled with the -Wconversion option.
These macros mpfr_cmp_ui
, mpfr_cmp_si
, mpfr_set_ui
and mpfr_set_si
for GCC-based compilers can have an incorrect behavior if user code with undefined behavior requires to behave according to some non-standard C extension (like with the use of the -fwrapv GCC option) and the call is done with an argument that requires an implicit conversion to unsigned long or long.
Patch 3 of GNU MPFR 3.0.0 is available in the bugs section of the MPFR 3.0.0 page. It fixes the underflow detection in the mpfr_gamma
function.
Patch 1 and patch 2 of GNU MPFR 3.0.0 are available in the bugs section of the MPFR 3.0.0 page.
Patch 1 fixes the following special cases of the mpfr_out_str
function: The integer value returned by mpfr_out_str
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).
Patch 2 fixes a compilation problem on some environments such as Solaris with Sun's compiler; this can be seen with make check
, where a typical error is the symbol alloca being undefined. This problem has been introduced in MPFR 3.0.0 (it was not present in previous versions).
The GNU MPFR 3.0.0 library (boudin aux pommes) has been released. The changes from the 2.4.* versions (list corrected on 2010-12-07):
MPFR 3.0.0 is binary incompatible with previous versions, but (almost) API compatible. More precisely the obsolete functions mpfr_random
and mpfr_random2
have been removed, the meaning of the return type of the function mpfr_get_f
has changed, and the return type of the function mpfr_get_z
is now int instead of void. In practice, this should not break any existing code.
MPFR is now distributed under the GNU Lesser General Public License version 3 or later (LGPL v3+).
Rounding modes GMP_RNDx
are now MPFR_RNDx
(GMP_RNDx
kept for compatibility).
A new rounding mode (MPFR_RNDA
) is available to round away from zero.
The rounding mode type is now mpfr_rnd_t (as in previous versions, both mpfr_rnd_t and mp_rnd_t are accepted, but mp_rnd_t may be removed in the future).
The precision type is now mpfr_prec_t (as in previous versions, both mpfr_prec_t and mp_prec_t are accepted, but mp_prec_t may be removed in the future) and it is now signed (it was unsigned in MPFR 2.*, but this was not documented). In practice, this change should not affect existing code that assumed nothing on the precision type.
MPFR now has its own exponent type mpfr_exp_t, which is currently the same as GMP's mp_exp_t.
Functions mpfr_random
and mpfr_random2
have been removed.
mpfr_get_f
and mpfr_get_z
now return a ternary value.
mpfr_strtofr
now accepts bases from 37 to 62.
mpfr_custom_get_mantissa
was renamed to mpfr_custom_get_significand
(mpfr_custom_get_mantissa
is still available via a #define
).
Functions mpfr_get_si
, mpfr_get_ui
, mpfr_get_sj
, mpfr_get_uj
, mpfr_get_z
and mpfr_get_z_2exp
no longer have cases with undefined behavior; in these cases, the behavior is now specified, and in particular, the erange flag is set.
New functions mpfr_buildopt_tls_p
and mpfr_buildopt_decimal_p
giving information about options used at MPFR build time.
New function mpfr_regular_p
.
New function mpfr_set_zero
.
New function mpfr_digamma
.
New function mpfr_ai
(incomplete, experimental).
New functions mpfr_set_flt
and mpfr_get_flt
to convert from/to the float type.
New function mpfr_urandom
.
New function mpfr_set_z_2exp
(companion to mpfr_get_z_2exp
, which was renamed from mpfr_get_z_exp
in previous versions).
Speed improvement for large precisions in the trigonometric functions (mpfr_sin
, mpfr_cos
, mpfr_tan
, mpfr_sin_cos
): speedup of about 2.5 for 105 digits, of about 5 for 106 digits.
Speed improvement for large precisions of the inverse trigonometric functions (arcsin, arccos, arctan): about 2 for 103 digits, up to 2.7 for 106 digits.
Some documentation files are installed in $docdir
.
The detection of a GMP build directory (more precisely, the internal header files of GMP) was previously done separately from the use of the --with-gmp-build configure option. This was not consistent with the documentation and with other parts of the configure script. So, as of MPFR 3.0.0, the internal header files of GMP are now used if and only if the --with-gmp-build configure option is given.
The configure script recognizes some extra long double formats (double big endian, double little endian, double-double big endian).
MPFR manual: added API Compatibility section.
Bug fixes.
GNU MPFR 3.0.0 Release Candidate 2 is available.
pow(-0.0,0.5)
vs sqrt(-0.0)
and GCCAccording to the Annex F of the ISO C99 standard (and the IEEE 754-2008 standard, but not yet referenced by the C standard), pow(-0.0,0.5)
shall return +0, while sqrt(-0.0)
shall return -0. The latter was actually defined by the old IEEE 754-1985 standard and in practice, it is implemented in hardware (by the processors). Following a discussion in the GCC development list, I noticed that GCC transformed pow(x,0.5)
into sqrt(x)
even for the value -0, which is incorrect. GCC 4.3.* and 4.4.3 (but not GCC 4.2.*) are affected by this bug, which I reported. It was fixed a few hours later.
INRIAGforge, which hosts the MPFR repository, will be updated on March 8. Due to this migration, the web pages on INRIAGforge will be unavailable on March 8 from 13:30 to 16:30 CET (12:30 to 15:30 UTC), and access to the Subversion repository will be unavailable from 16:30 to 17:30 CET (15:30 to 16:30 UTC).
The MPFR web site and mailing-list are not hosted on INRIAGforge, thus will not be affected.
The Handbook of Floating-Point Arithmetic, written by several members of Arénaire (including me), has been available for a few weeks.
Floating-point arithmetic is by far the most widely used way of implementing real-number arithmetic on modern computers. Although the basic principles of floating-point arithmetic can be explained in a short amount of time, making such an arithmetic reliable and portable, yet fast, is a very difficult task. From the 1960s to the early 1980s, many different arithmetics were developed, but their implementation varied widely from one machine to another, making it difficult for nonexperts to design, learn, and use the required algorithms. As a result, floating-point arithmetic is far from being exploited to its full potential.
This handbook aims to provide a complete overview of modern floating-point arithmetic, including a detailed treatment of the newly revised (IEEE 754-2008) standard for floating-point arithmetic. Presented throughout are algorithms for implementing floating-point arithmetic as well as algorithms that use floating-point arithmetic. So that the techniques presented can be put directly into practice in actual coding or design, they are illustrated, whenever possible, by a corresponding program.
Key topics and features include:
Presentation of the history and basic concepts of floating-point arithmetic and various aspects of the past and current standards
Development of smart and nontrivial algorithms, and algorithmic possibilities induced by the availability of a fused multiply-add (FMA) instruction, e.g., correctly rounded software division and square roots
Implementation of floating-point arithmetic, either in software—on an integer processor—or hardware, and a discussion of issues related to compilers and languages
Coverage of several recent advances related to elementary functions: correct rounding of these functions and computation of very accurate approximations under constraints
Extensions of floating-point arithmetic such as certification, verification, and big precision
Handbook of Floating-Point Arithmetic is designed for programmers of numerical applications, compiler designers, programmers of floating-point algorithms, designers of arithmetic operators, and more generally, students and researchers in numerical analysis who wish to better understand a tool used in their daily work and research.
We have received an announce saying that the computer systems at the Loria will be stopped from Friday, February 5 at 17:00 (16:00 UTC) to Sunday, February 7 at 19:00 (18:00 UTC). The mpfr.org web server and the MPFR mailing-list will be affected by this downtime. Sorry for the inconvenience.
Patch 3 of MPFR 2.4.2 is available in the bugs section of the MPFR 2.4.2 page. It allows one to build MPFR with the GMP 5 internal files (necessary due to an internal change in GMP), i.e. when using the --with-gmp-build option. Note: most users don't need this patch.
InriaGforge scheduled downtime: on 2010-01-14, from 16:00 to 18:00 UTC, the InriaGforge site and all associated services will be unavailable due to maintenance operations on servers.
The MPFR web site and mailing-list will not be affected.
Patch 1 and patch 2 of MPFR 2.4.2 are available in the bugs section of the MPFR 2.4.2 page.
Patch 1 fixes a minor bug: the underflow flag is not set when calling the mpfr_sin_cos
function on the minimum positive number or its opposite with rounding toward zero or equivalent.
Patch 2 allows one to build MPFR on MIPS processors with GCC 4.4 and later.
The GNU MPFR 2.4.2 library (andouillette sauce moutarde, patch level 2) has been released. The changes from the 2.4.1 version:
Security fix in formatted output functions (buffer overflow).
Formatted output functions: 6 is now the default value for empty precision field with %Rf.
Better portability of configure script.
Detection of intmax_t and uintmax_t types.
Improved documentation: mpfr_get_z_exp
, mpfr_strtofr
, mpfr_get_str
and formatted output functions.
Improved message in case of assertion failure.
Updated tcmp_ld test to really test the long double.
Some documentation files are installed in $docdir
.
Removed mpfr_init_cache
(unused and undocumented function).
Fixed the way $CC
/ $CFLAGS
are got from gmp.h (__GMP_CC
/ __GMP_CFLAGS
).
Bug fixes.
Also note that GCC 4.4.0 (only this obsolete version) does not build MPFR 2.4.2 correctly; this problem is detected by make check
(failures in tget_z and tpow_all).
The third release candidate of GNU MPFR 2.4.2 is available.
The main problem found in the second release candidate (also present in previous MPFR versions): When gcc is installed, gmp.h contains __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), then the build of MPFR can fail. The reason is that the configure script detected the presence of gcc before the compiler from __GMP_CC
was chosen (replaced gcc), so that the script did some settings related to gcc (due to some autoconf macro), such as selecting gcc-specific options for dependency tracking.
The second release candidate of GNU MPFR 2.4.2 is available.
Moreover I've just fixed a bug in mpfr_sin_cos
and updated the bugs section of the GNU MPFR 2.4.1 page.
Les 3es rencontres Arithmétique de l'Informatique Mathématique (RAIM'09) auront lieu à Lyon, au Laboratoire de l'Informatique du Parallélisme (ENS Lyon), du lundi 26 au mercredi 28 octobre 2009. Ces rencontres sont organisées dans le cadre du Groupe de Travail Arithmétique du GDR Informatique Mathématique, pôle Calcul Formel, Arithmétique et Géométrie.
La date limite d'inscription est fixée au lundi 12 octobre 2009.
L'inscription est sans frais, mais nécessaire à des fins d'organisation. Le formulaire est accessible sur le site web des rencontres.
Cette édition est organisée autour de cinq thèmes:
Numération (responsable: Anne Siegel).
Géométrie et arithmétique (responsable: Dominique Michelucci).
Opérateurs arithmétiques (responsable: Laurent-Stéphane Didier).
Validation numérique et preuve formelle (responsable: Micaela Mayero).
Calcul formel (responsable: Alin Bostan).
Ces rencontres comportent également deux cours d'une heure sur des domaines proches:
Traitement du signal (Daniel Ménard).
Nouvelles architectures (David Defour et Florent de Dinechin).
Le programme détaillé est disponible depuis le site web des rencontres.
I have received the following announce. In short, the computer systems at the Loria will be stopped from Friday, September 18 at 18:00 (16:00 UTC) to Saturday, September 19 at 20:00 (18:00 UTC). The mpfr.org web server and the MPFR mailing-list will be affected by this downtime. Thank you for your understanding.
For an unknown reason, the MPFR web server (mpfr.org) has been down since Saturday 20 June in the afternoon (at least); other servers hosted at Loria are affected too. This may last until Monday. Sorry for the inconvenience.
[Update] It has been back online since 2009-10-22 07:00 UTC. It was due to a power outage.
Some information after the Arith-19 conference... The articles can be retrieved from the program page of the Arith-19 web site. The deadline for the special issue is 2009-08-03.
We (Andreas Enge, Vincent Lefèvre, Philippe Théveny and Paul Zimmermann) organize a summer school on MPFR and MPC on June 25-26 in Nancy, following the previous edition of October 2007, which was a great success. This school is intended for people (researchers or engineers) who want to grasp those two libraries. The school will consist of half presentations and half practical sessions where participants will learn how to (best) use MPFR and MPC on small exercises. Participants are also welcome to come with their own problems.
A priori the language is French, however if we get enough interest from non French-speaking participants, we might switch the language to English.
[Update 2009-03-30] It is now possible to register (up to June 19, or May 29 with accommodation).
Patch 3 and patch 4 of MPFR 2.4.1 are available in the bugs section of the MPFR 2.4.1 page.
Patch 3 adds casts in the tests. With most (if not all) C implementations, the tests should not be affected by these missing casts.
Patch 4 fixes the following bug. A type is incorrect in the vasprintf.c file. In practice, this can make MPFR crash when the M specifier (for the formatted output functions) is used and a limb does not have the same size as a pointer (e.g. when GMP has been built with ABI=mode32
on PowerPC G5).
Patch 2 of MPFR 2.4.1 is available in the bugs section of the MPFR 2.4.1 page. It fixes a minor problem in the assertion failure messages, which do not say explicitly that the failure has been detected in MPFR.
The MPFR trunk has switched to the version 3.0 (or later) of the GNU Lesser General Public License (LGPL). Thus this will be the license of the future MPFR 3.0.
InriaGforge scheduled downtime: on 2009-03-09, from 18:45 to 20:15 UTC, the InriaGforge site and all associated services will be unavailable due to maintenance operations on servers.
Patch 1 of MPFR 2.4.1 is available in the bugs section of the MPFR 2.4.1 page. It fixes a bug in the remainder functions (mpfr_fmod
, mpfr_remainder
and mpfr_remquo
): these functions round the result before changing its sign when the input 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.
After I've discovered a buffer overflow by chance as I was rereading the source of the formatted output functions of MPFR (for I thought I had found a bug in mpfr_printf
, whereas it was in fact a nice side effect somewhere in my code), that could have security implications, we decided to immediately release this new version: GNU MPFR 2.4.1. The changes from the 2.4.0 version:
Security fix in mpfr_snprintf
and mpfr_vsnprintf
(buffer overflow).
Configure: new checks for length modifiers hh and ll (new in C99) as hh is absent on alpha-OSF1-V5.
Miscellaneous corrections in the MPFR manual. In particular, mpfr_inits
, mpfr_inits2
, mpfr_clears
and MPFR_DECL_INIT
have been in the public API since MPFR 2.4.0.
Due to power outage, the servers hosting mpfr.org and the MPFR mailing-list will be down from today February 3 at 17:00 UTC until tomorrow February 4 at 08:00 UTC.
Note that the InriaGforge servers (Subversion...) will not be affected.
The GNU MPFR 2.4.0 library (andouillette sauce moutarde) has been released. The changes from the 2.3.* versions:
MPFR is now a GNU package.
Changes in the behavior of mpfr_strtofr
and in its documentation concerning particular cases where the code and the documentation did not match; this change is also present in MPFR 2.3.1.
Behavior of mpfr_check_range
changed: if the value is an inexact infinity, the overflow flag is set (in case it was lost); this change is also present in MPFR 2.3.2.
Function mpfr_init_gmp_rand
(only defined when building MPFR without the --with-gmp-build configure option) is no longer defined at all. This function was private and not documented, and was used only in the MPFR test suite. User code that calls it is regarded as broken and may fail as a consequence. Running the old test suite against MPFR 2.4.0 may also fail.
New functions:
between a MPFR number and a double: mpfr_add_d
, mpfr_sub_d
, mpfr_d_sub
, mpfr_mul_d
, mpfr_div_d
, mpfr_d_div
;
formatted input/output: mpfr_printf
, mpfr_fprintf
, mpfr_vprintf
, mpfr_vfprintf
, mpfr_sprintf
, mpfr_snprintf
, mpfr_vsprintf
, mpfr_vsnprintf
, mpfr_asprintf
, mpfr_vasprintf
;
mpfr_sinh_cosh
, mpfr_li2
, mpfr_modf
, mpfr_fmod
, mpfr_rec_sqrt
.
Configure test for TLS support.
Get default $CC
and $CFLAGS
from gmp.h (__GMP_CC
/ __GMP_CFLAGS
, which are available as of GMP 4.2.3).
Documented the fact that mpfr_random
and mpfr_random2
will be suppressed in the next release, and that the specification of mpfr_eq
may change in the next release (for compatibility with the mpf layer of GMP).
Bug fixes.
The third release candidate of MPFR 2.4.0 is available. Note that if MPFR is built using GMP's build directory, the compilation of the tests will fail with an error like: error: invalid lvalue in unary `&'. This problem has been fixed in the trunk (and the release will have the fix, after some more tests).
Also, the MPFR web site will not be reachable on January 23 between 06:00 and 06:30 UTC.
An efficient rounding boundary test for pow
(x,y) in double precision, written with Christoph Lauter, in IEEE Transactions on Computers, 58(2):197–207, February 2009. The bad typography and bitmap figures are not our fault.
Computing correctly rounded integer powers in floating-point arithmetic (PDF), written with Peter Kornerup, Christoph Lauter, Nicolas Louvet and Jean-Michel Muller (research report). An updated version will be published in ACM Transactions on Mathematical Software in 2009.
Worst cases for the exponential function in the IEEE 754r decimal64 format, an article written no less than two years ago with Damien Stehlé and Paul Zimmermann, but that was published only this year in the Lecture Notes in Computer Science. PostPrint freely available on HAL.
MPFR 2.4.0 Release Candidate is available.
The InriaGforge service will migrate on December 4. This will affect the MPFR Subversion repository (but neither the mpfr.org web site, nor the MPFR mailing-list, which are hosted somewhere else).
I've added a small C program to test the effect of the contraction to FMA on my computer arithmetic pages. It shows that under some conditions, one can have expressions like 1.1 × 1.1 - 1.1 × 1.1 whose evaluation does not return 0, which can give subtle bugs, in particular if the result is a negative number and one takes its square root...
On a similar subject (but only on constant expressions and without an example of failure in practice), see Defect Report #300.
The MPFR 2.3.2 library has been released. The changes from the 2.3.1 version:
Bug fixes; see the MPFR 2.3.1 page.
Improved MPFR manual.
Behavior of mpfr_check_range
changed: if the value is an inexact infinity, the overflow flag is set (in case it was lost).
Function mpfr_init_gmp_rand
(only defined when building MPFR without the --with-gmp-build configure option) is no longer defined at all. This function was private and not documented, and was used only in the MPFR test suite. User code that calls it is regarded as broken and may fail as a consequence. Running the old test suite against MPFR 2.3.2 may also fail.
The IEEE Standards Revision Committee (RevCom) approved P754 (revision of the IEEE-754 standard) unanimously, which was then approved by the IEEE-SA Standards Board on 12 June 2008.
Arith'19 (19th IEEE Symposium on Computer Arithmetic) call for papers. Deadline: 2008-10-15. Conference: 8-10 June 2009, Portland, Oregon, USA.
Patch 1 of MPFR 2.3.1 is available in the bugs section of the MPFR 2.3.1 page. It fixes a bug in the thread-safe configure test (enabled when the --enable-thread-safe option is given): this test always fails when the build directory is different from the source directory. Note that if you could already build MPFR 2.3.1, then you don't need this patch.
The MPFR 2.3.1 library has been released. The changes from the 2.3.0 version:
Changes in the behavior of mpfr_strtofr
and in its documentation concerning particular cases where the code and the documentation did not match.
Bug fixes; see the MPFR 2.3.0 page.
Configure test for TLS support.
Improved MPFR manual.
MPFR 2.3.1 Release Candidate 2 is available.
MPFR 2.3.1 Release Candidate is available.
GNU C library (glibc): printf
doesn't take the rounding mode into account opened on 2007-09-19.
Perl: floating-point binary-decimal conversion bugs opened on 2007-11-19.
Debian / GNU C library (glibc): libc6: strtod("-0", 0)
returns +0.0 instead of -0.0 fixed in Debian on 2007-11-23.
Debian / zsh: zsh: printf %g -0
outputs 0 instead of -0 fixed in Debian on 2007-11-25.
FreeBSD: output of long double subnormals (with printf
) is wrong by a factor 2 fixed in HEAD on 2007-12-09.
A short note about the next events related to computer arithmetic.
Dagstuhl Seminar 08021: Numerical Validation in Current Hardware Architectures, January 6-11, 2008.
8th Conference on Real Numbers and Computers (RNC8), July 7-9, 2008, Santiago de Compostela, Spain. Submission deadline: February 8, 2008 February 22, 2008 (extended deadline).
First challenge in the forecast of solar power, friendly competition part of RNC8.
2es Rencontres Arithmétique de l'Informatique Mathématique (RAIM) du GDR Informatique Mathématique, 3-5 juin 2008, Lille.
Patches 1 to 4 are available in the bugs section of the MPFR 2.3.0 page.
The first patch is necessary when the build directory is different from the source directory. The second patch fixes an assertion failure in mpfr_acosh
on arguments that are slightly larger than 1 (this bug can occur only if the precision of the destination is strictly smaller than the precision of the input argument), but I'm not sure about the error analysis; a better patch will published later. The third patch fixes an important bug in mpfr_atan2
, which occurs when the underflow flag is set before the function call. The fourth patch fixes various bugs in mpfr_subnormalize
.
A bug in Microsoft Excel 2007 has recently been found, which has the effect of giving 100,000 instead of 65,535 and 100,001 instead of 65,536 after some calculations. In fact, it is only a display bug, because of an incorrect conversion from base 2 to base 10 (the value stored internally is correct). Details about this bug on the blog for Microsoft Excel.
Let us recall that in the past, Microsoft Excel already had a similar bug, but when a number was entered (incorrect conversion from base 10 to base 2) instead of displayed: entering 1.40737488355328 in Excel 3.0 to 7.0 was giving 0.64 (see also Microsoft support and via Google).
Powers of two are involved in both cases: 65536 = 216 and 1.40737488355328 = 247 / 1014.
After the discovery of this new bug, some people lost no time to recommend the switch to OpenOffice. But OpenOffice also has its problems, such as trying to correct the rounding errors, which can give surprising results and hide user-side bugs (see a discussion [CALC] Calculs imprécis on the users-fr list, in French). Now, I don't know if Excel does the same kind of things. There are reasons to switch to OpenOffice, but they are very different.
The MPFR 2.3.0 library has been released. The main changes from the 2.2.* versions:
The mpfr.info file is now installed in the share subdirectory (as required by the Filesystem Hierarchy Standard); see output of ./configure --help.
The shared library is now enabled by default. If the MPFR build fails on your platform, try the --disable-shared configure option to disable the shared library.
Thread-safe support with Microsoft Visual compiler.
New functions mpfr_j0
, mpfr_j1
, mpfr_jn
, mpfr_y0
, mpfr_y1
, mpfr_yn
, mpfr_lgamma
, mpfr_remainder
, mpfr_remquo
, mpfr_fms
, mpfr_signbit
, mpfr_setsign
, mpfr_copysign
, mpfr_get_patches
.
Functions mpfr_sin
, mpfr_cos
and mpfr_sin_cos
improved (argument reduction).
More detailed MPFR manual.
Improved tests (make check).
Bug fixes.
MPFR 2.3.0 Release Candidate 2 is available.
A CEA-EDF-INRIA school on the certified numerical computation theme will be held at the Loria (Nancy) on October 25-26, 2007.
The goal of this school is to make evidence of the problems arising with numerical computations using floating-point arithmetic (round-off error, limited precision, underflow or overflow, etc.) and to propose some new tools on this topic, in particular an initial formation to the MPFR library for floating-point computation in arbitrary precision.
Audience: engineers or researchers, either from public institutions or private companies. Warning! The number of attendees is limited.
My most recent papers:
Worst cases of a periodic function for large arguments, written with Guillaume Hanrot, Damien Stehlé and Paul Zimmermann. To appear in the Arith-18 proceedings in June 2007.
Abstract: One considers the problem of finding hard to round cases of a periodic function for large floating-point inputs, more precisely when the function cannot be efficiently approximated by a polynomial. This is one of the last few issues that prevents from guaranteeing an efficient computation of correctly rounded transcendentals for the whole IEEE-754 double precision format. The first non-naive algorithm for that problem is presented, with an heuristic complexity of O(20.676 p) for a precision of p bits. The efficiency of the algorithm is shown on the largest IEEE-754 double precision binade for the sine function, and some corresponding bad cases are given. We can hope that all the worst cases of the trigonometric functions in their whole domain will be found within a few years, a task that was considered out of reach until now.
Some notes on the possible under/overflow of the most common elementary functions, written with Jean-Michel Muller. May 2007.
Abstract: The purpose of this short note is not to describe when underflow or overflow must be signalled (it is quite clear that the rules are the same as for the basic arithmetic operations). We just want to show that for some of the most common functions and floating-point formats, in many cases, we can know in advance that the results will always lie in the range of the numbers that are representable by normal floating-point numbers, so that in these cases there is no need to worry about underflow or overflow. Note that when it is not the case, an implementation is still possible using a run-time test.
Computing integer powers in floating-point arithmetic, written with Peter Kornerup and Jean-Michel Muller. May 2007.
Abstract: We introduce two algorithms for accurately evaluating powers to a positive integer in floating-point arithmetic, assuming a fused multiply-add (fma) instruction is available. We show that our log-time algorithm always produce faithfully-rounded results, discuss the possibility of getting correctly rounded results, and show that results correctly rounded in double precision can be obtained if extended-precision is available with the possibility to round into double precision (with a single rounding).
ARITH18 - 18th IEEE Symposium on Computer Arithmetic, June 25-27, 2007, Montpellier, France. Early registration deadline: May 25, 2007.
Of course, I'll be there!
I've added a new category: Lyon, about the city of Lyon, France (events...). Four old blog items have been classified in this category.
Note: It is not possible to do category-based filtering at the server level yet, but I may add that one day...
Patches 2 to 5 are available in the bugs section of the MPFR 2.2.1 page. The first three fix various problems related to exceptions, and patch 5 updates the MPFR manual: The default install directory for the info file has changed and this patch updates it in the manual, and it adds a new section Exceptions and the missing description of the mpfr_dim
function (that was added to MPFR 2.0.1).
The MPFR 2.2.0 to 2.2.1 changes didn't mention the following change:
The mpfr.info file is now installed in the share subdirectory (as required by the Filesystem Hierarchy Standard); see output of ./configure --help.
I've updated the MPFR web page, the NEWS files and fixed the mpfr.texi files (in both the trunk and 2.2 branch). Users should make sure that their INFOPATH environment variable has a correct value, e.g. /usr/local/share/info:/usr/local/info (in this order, in case old files remain in /usr/local/info).
It was a change in autoconf 2.59c (more information in autoconf's NEWS file).
As this was requested, the supplied patches for MPFR now modify the version string by adding a suffix (-p1, -p2, and so on), so that one can know what patches have been applied. For practical reasons, not all the files where the version appears are patched, but the updated version string is available with the MPFR_VERSION_STRING
macro (mpfr.h header file) and the mpfr_get_version
function (library).
Patch 1 is available in the bugs section of the MPFR 2.2.1 page. It adds the mpfr_init_set_ld
macro, which is documented in the MPFR manual.
L'École Jeunes Chercheurs Informatique Mathématique (ex École Jeunes Chercheurs en Algorithmique et Calcul Formel) se tiendra cette année à Nancy, au LORIA, du 19 au 23 mars 2007. Date limite d'inscription et de soumission d'un exposé: 2 mars 2007.
The presentations of the Rencontres Arithmétique de l'Informatique Mathématique (which took place in Montpellier, France, on January 22-25) are now available, mainly in French.
INT_MIN
% -1
BehaviorThis is apparently a well-known GCC bug, but it has just been reported on GCC's BTS (bug 30484), following a discussion on this subject in the GCC development mailing-list. According to the ISO C standard,
has the value 0, but I obtain the following results on my various machines:INT_MIN
% -1
Floating-point exception under Linux/x86, with gcc 4.1.2 (prerelease).
2147483647 under Linux/PowerPC (G4), with gcc 4.1.2 (prerelease).
-2147483648 under Mac OS X PowerPC G5, with gcc 4.0.1 from Apple (Xcode 2.4.1).
But on my Zaurus (Linux/ARM), I obtain the correct value 0. I have used the following program:
#include <limits.h> #include <stdio.h> int main (void) { volatile int i = INT_MIN, j = -1; printf ("%d\n", i % j); return 0; }
Whe one gets an incorrect behavior in C, it is the same with Perl, using the following script:
#!/usr/bin/env perl use integer; $x = -2147483648; $y = -1; print "$x % $y = ", $x % $y, "\n";
If someone has a real code that can fail due to this bug, let him signal it! For MPFR, we had to face bugs on other particular cases (e.g. on 0 +
, LONG_MIN
and LONG_MIN
/ 1
).LONG_MIN
/ (-2)
New page: my analysis of the Debian bug 153548 in glibc. I explain why only a few values are (completely) wrong.
The MPFR 2.2.1 library has been released. The main changes from the 2.2.0 version:
Many bug fixes (see the MPFR 2.2.0 page for the list).
Updated mpfr-longlong.h from the GMP 4.2 longlong.h file.
Moved some internal declarations from mpfr.h to mpfr-impl.h.
Use -search_paths_first on Darwin (Mac OS X) to fix linking behavior.
Improved make check: much more complete generic tests.
Improved INSTALL file and MPFR manual.
After 17 years, Jean-Michel Muller's book Arithmétique des ordinateurs is now freely available, as scanned pages (as Jean-Michel used proprietary word processing software at that time instead of TeX).
Patch 16 is available on the MPFR 2.2.0 page. It fixes the failure of the texp2 test.
Patch 15 is available on the MPFR 2.2.0 page. It fixes several bugs, mainly related to particular cases, exceptions and global flags.
Patches 13 and 14 are available on the MPFR 2.2.0 page. They fix problems concerning include and library paths.
Patches 11 and 12 are available on the MPFR 2.2.0 page. They fix miscellaneous problems with the division and the mpfr_get_f
function.
Moreover directories may be added in an inconsistent order to CPPFLAGS and LDFLAGS, which may yield an incorrect library in some cases. This problem is fixed in the Subversion repository. But you may still get a warning saying that gmp.h and libgmp seems to have different versions or you cannot run a program linked with GMP. The test is not reliable enough in practice and the warning may be confusing; therefore the related code should be changed or removed. The MPFR library should still be built correctly, though.
I've written a small Perl module that provides a Perl interface to Maple and masks most of the problems with Maple I had to face. It is available from my Maple page, which gives a few explanations.
A friendly competition of exact real arithmetic software will be held in Nancy during the RNC7 conference. The goal is to measure the performance of various numerical computing packages on a set of challenging problems, with a strong emphasis on accuracy. All packages with arbitrary precision capabilities are welcome to compete...
The MPFR web site will be unavailable from 2006-04-20 16:00 UTC for a few hours, due to an upgrade of the network where the web site is hosted (Loria). The project web site on InriaGforge and the Subversion repository are not concerned by this network interruption.
I've added a new page on Maple. For the moment, it contains only a section on how to use Maple with the Perl language under Unix (Linux or Solaris), by using either pipes or a pseudo-terminal (pty).
This is one-week old, but I forgot to announce it here... Patch 9 is available on the MPFR 2.2.0 page. It fixes a small bug in the mpfr_random2
function. In practice, this bug has probably no effect.
Patch 8 is available on the MPFR 2.2.0 page. It fixes bugs in the mpfr_get_f
and mpfr_set_f
conversion functions with the mpf layer of GMP: mpfr_get_f
gives a wrong value when the result has a negative exponent and mpfr_set_f
does not support overflows. If you do not use mpf, this patch will probably be useless to you.
Une page web Recrutements sur des postes scientifiques au Loria a été ouverte.
Patch 7 is available on the MPFR 2.2.0 page. It fixes a rounding bug in the mpfr_sin
function for some worst cases (as those used to test the standard C library).
Patch 6 is available on the MPFR 2.2.0 page. It fixes an important efficiency problem in mpfr_div
when the divisor has a much smaller precision than the dividend; this problem was introduced after the rewrite of the division code for MPFR 2.2.0, so that previous MPFR versions are not affected.
I've received Loria's medal, with the other members of the MPFR team, after we won the Many Digits Friendly Competition.
We've just published a research report on MPFR (link on HAL).
Patch 5 for MPFR 2.2.0 is available. This patch fixes various problems (see the web page for the details).
A new MPFI version (1.3.4-RC1) is available. This is the first version supporting MPFR 2.2.0. Thanks Fabrice for this update!
The old CVS repository of MPFR is closed. The MPFR library is now hosted on InriaGforge. At the same time, the repository has been converted to Subversion.
See the information about InriaGforge, MPFR and Subversion on the MPFR web site.
DPE project page ([Update 2022-10-08] New URL at Inria GitLab, since InriaForge has been closed).
The DPE library provides floating-point numbers with large exponents. A DPE number is represented by a pair (d, e), where d is a floating-point number in [1/2, 1), and e is the corresponding exponent (int type), representing d × 2e.
DPE is developed by Patrick Pélissier and Paul Zimmermann in the SPACES project (Loria / INRIA Lorraine).
The MPFR team, which I belong to, has won the Many Digits Friendly Competition, that took place on 3 and 4 October 2005 at Radboud University, Nijmegen, The Netherlands.
The results and the detailed final timings and rankings.
For the problem 20, the formula giving cos(π/17), which I knew since it is in my list of 17's, was very useful. I was also interested in the problem 17, for which I could pass from N = 4 to N = 5 by hacking the zeta_ui
function written by Paul, to calculate ζ(3) and ζ(5) at the same time and avoid in this way to do some identical computations twice.
For the users of Darwin (Mac OS X) who wish to build a dynamic library, a new patch is available on the MPFR 2.2.0 page. At the time of the MPFR 2.2.0 release, there was a bug in the libtool used to generate the MPFR configure script, preventing the creation of shared libraries on Darwin. This script can be fixed by this patch (thanks to Dave Morrison); alternatively, users can run autoreconf if they have the necessary tools.
Users of the CVS tree are not affected by this problem since they need to run these tools on their own machine.
Two patches are available on the MPFR 2.2.0 page.
The Debian package libmpfr-dev 2.2.0.dfsg.1-1 has been uploaded; it contains these two patches, but no longer contains the documentation due to the Debian policy concerning the documentation license.
Under Linux/x86, like some other JVMs, the Kaffe Virtual Machine was computing internally in extended precision, though this is not allowed by the Java specification. This problem has been fixed in the 1.1.6-2 Debian package (I don't know anything about the other Linux distributions).
For more information on this bug and the problems related to extended precision under Linux/x86, please see my page Linux and the Extended Precision on x86 Processors. I've also just added a reference to my paper The Euclidean division implemented with a floating-point division and a floor, which gives an example particularly useful for programs written in ECMAScript (often referred to as Javascript) or using XPath.
The MPFR 2.2.0 library has been released. The main changes from the 2.1.* versions:
Bug fixes.
New functions: mpfr_set_overflow
, mpfr_set_underflow
, mpfr_set_inexflag
, mpfr_set_erangeflag
, mpfr_set_nanflag
, mpfr_erfc
, mpfr_atan2
, mpfr_pow_z
, mpfr_subnormalize
, mpfr_const_catalan
, mpfr_sec
, mpfr_csc
, mpfr_cot
, mpfr_root
, mpfr_eint
, mpfr_get_f
, mpfr_sech
, mpfr_csch
, mpfr_coth
, mpfr_lngamma
.
New macro: MPFR_VERSION_STRING
.
The exported MPFR variables have been removed from mpfr.h (they were undocumented, so programs which respect the API still work).
The mathematical functions are faster (both average and worst cases).
Better support for the long double type.
Shared library support.
Thread safe (if built with the --enable-thread-safe configure option).
Logging facility.
Change in the semantics of mpfr_out_str
and mpfr_get_str
when the number-of-digits parameter is 0.
Better locale support.
This version is binary compatible with previous versions if you do not use undocumented features.
The Arith'17 slides are available on the conference web site and mirrored here.
The MPFR 2.1.2 library has been released. This is a bug-fix release, including the 12 patches to the 2.1.1 version.
You can download it in one of the following three archive formats:
mpfr-2.1.2.tar.bz2 (signature, MD5: 4e2b64fe2263d093bd809820221289a8),
mpfr-2.1.2.tar.gz (signature, MD5: d3bf773894478bf71af87f681b6819a1),
mpfr-2.1.2.zip (signature, MD5: 2f29793940d782e313d4eb8ba2f30e8d).
This new version will appear soon as a Debian package.
Many DigitsFriendly Competition
A friendly competition/benchmark session for investigating the state of the art in the various implementations of exact real arithmetic will be held at Radboud University, Nijmegen, The Netherlands, on 4 October 2005.
All the interactive software packages capable of handling arbitrary precision arithmetic on elementary functions are invited to participate. Moreover all libraries for handling arbitrary precision arithmetic in any programming language are welcome to participate provided that the participant writes a suitable interface/program.
A remote participation is possible. See the call for participation (registration deadline: 26 August).
The blog index pages are now reduced to 15 items. The whole set of items is now available on a new page. New improvements will come later...
A new patch is available on the MPFR 2.1.1 page. It fixes a bug that may occur with some locales, e.g. with the Turkish locale tr_TR.ISO8859-9, where the ASCII characters I and i do not match (the lowercase version of I is the dotless i).
I discovered this bug after reading a development file from Mutt, where similar problems may occur if developers do not take care. As often, while doing tests, I discovered another bug, in zsh.
Three new patches (since 2005-05-12) are available on the MPFR 2.1.1 page.
Since the last few months:
[March] Test of mathematical functions of the standard C library: two new tested functions (cube and cube root).
[May] Linux/x86 and the extended precision: various updates.
[June] New test program overflow.c.
[June] My slides for the Arith'17 conference are available.
Miscellaneous announces I've received in my mailbox...
2005-06-15: Call For Papers Real Numbers, special issue of Theoretical Informatics and Applications (dead-line postponed to June 15).
2005-09-01: Call For Papers More Accurate Computation: Methods and Software at SAC 2006.
I've written a page on the results of the search for worst cases (for the Table Maker's Dilemma) for the 2x function in x86 extended precision (64-bit mantissa), between 1/2 and 1.
A new patch is available on the MPFR 2.1.1 page. It fixes a bug in the mpfr_div_ui
function.
Four new patches (since 2005-03-09) are available on the MPFR 2.1.1 page.
Due to a power downtime of the Loria, the MPFR web site is not accessible until April 20, at about 07:30 UTC. The e-mails to addresses at Loria will neither be lost nor rejected, but they will not be read before the servers are put back online.
The slides of my presentation (in French) at the Arinews workshop on 7-8 March 2005 are available on my research page.
I'm writing a research report on this subject, giving more details. The abstract:
We study conditions under which the Euclidean division can be implemented using a floating-point division followed by a
floor
function. We show that under reasonable assumptions, the rounding downward mode can always be used, and the rounding to nearest mode can be used in most practical cases. These results may be useful for any language, but there is a particular benefit for languages, like ECMAScript, that do not have an integer division and that always round to nearest.
Two patches are available on the MPFR 2.1.1 page. They have been applied in the Debian package libmpfr-dev 2.1.1-2.
Under Linux/x86, like some other JVMs, JamVM was computing internally in extended precision, though this is not allowed by the Java specification. I've just learned that this problem had been fixed in the 1.2.1 release (2004-12-02). To my knowledge, it is the second free JVM implementation to be fixed and now computing correctly.
For more information on this bug and the problems related to extended precision under Linux/x86, please see my page Linux and the Extended Precision on x86 Processors.
The MPFR 2.1.1 library has been released. This is a bug-fix release, including the 17 patches to the 2.1.0 version.
You can download it in one of the following three archive formats:
mpfr-2.1.1.tar.bz2 (MD5: 843422d90349800ee721f6710d051c87),
mpfr-2.1.1.tar.gz (MD5: b7eb5932ab86c78d13ed0569ad26af38),
mpfr-2.1.1.zip (MD5: b999dea40758ea5fecf6afb1b65dacf4).
This new version will appear soon as a Debian package.
I've found a new bug in MPFR 2.1.0: the function mpfr_ui_sub
applied to the integer 0 and the floating-point number +0 gives +0 instead of −0; this bug was introduced in MPFR 2.1.0, thus it is not present in previous versions. The patch is available on the MPFR 2.1.0 page.
Three new patches are available on the MPFR 2.1.0 page.
Miscellaneous announces I've received in my mailbox...
2005-03: Journées Arinews, March 7-8, 2005, ENS Lyon, France.
2005-04: École Jeunes Chercheurs en Algorithmique et Calcul Formel, April 4-8, 2005, Montpellier, France.
2005-07: SNC 2005: International Workshop on Symbolic-Numeric Computation, July 19-21, 2005, Xi'an, China (satellite conference of ISSAC 2005).
2005-09: CASC'2005: The 8th International Workshop on Computer Algebra in Scientific Computing, September 12-16, 2005, Kalamata, Greece. Deadline for submissions: April 1, 2005.
Postdoc opportunity, ENS Lyon, France.
A 13th patch is available on the MPFR 2.1.0 page.
I detected the bug thanks to the worst cases of the sine function in double precision, as some of them made the new code on the CVS trunk (future version 2.2.0) fail.
12 patches are available on the MPFR 2.1.0 page.
Several platforms added to the page of the tests of mathematical functions of the standard C library. I've also added the timings of the tests for each platform (except some old ones, that are not available any longer).
I noticed that the -ffloat-store option was necessary for gcc 3.4 under Linux/x86. Indeed the results of some functions of the mathematical library are and remain in extended precision after an assignment. This does not conform to the ISO/IEC 9899:1999 standard (C language); it is a bug in gcc (any version). This option is now systematically used with gcc.
I've added a new page on the formats of the electronic versions of my publications and slides. It deals with HTTP content negotiation and some problems with the postscript/PDF viewer gv, in particular.
rint
glibc Bug FixedThe glibc bug 602 powerpc rint()
function is buggy in the rounding toward -inf and +inf modes has just been completely fixed in the CVS. Thanks!
Added the page Floating-Point Arithmetic Test Programs. I've also updated tst-ieee754.c as the test of assignments in extended precision no longer showed a bug in gcc 3.4, probably because of a new optimization related to static functions; the test has been improved and the bug is still there in gcc.
Page of the tests of mathematical functions of the standard C library: I've added host dixsept.loria.fr (Pentium 4 model 3, i.e. Prescott), which gives the same results as the other Pentium 4 processors, as expected.
The MPFR 2.1.0 library has been released.
Download it (MD5: 9174f5e0cd43f2253b5779743368c8f2). MPFR 2.1.0 is also available as an official Debian package (unstable distribution only).
I've added results of 5 additional machines at testdrive.hp.com on the page of the tests of mathematical functions of the standard C library:
spe191 (PA-RISC 8800 under HP-UX).
spe145 (Alpha EV56 under OSF1 4.0).
spe206 (Alpha EV67 under OSF1 5.1).
spe176 (Intel Itanium 2 under HP-UX).
spe189 (AMD Opteron 248 under GNU/Linux). According to the results, this machine uses the mathematical functions (partly with exact rounding) from the glibc library.
Here's my new general blog. It doesn't have a particular subject, but for those who are interested only in some subjects, I'll add server-side filtering mechanisms on some categories. You can already set up a client-side filtering (with your RSS feed reader, or with CSS for the web version, for instance).
My already existing blog on computer arithmetic and my research pages is integrated to this general blog, but the old URLs remain valid and currently constitute the only server-side filtering.
Some entries will be written only in French and will appear untranslated in the English version of my blog; server-side filtering on the language is also planned.
The first call for participation for the 6th Conference on Real Numbers and Computers (RNC6), November 15-17, 2004, Schloß Dagstuhl, Germany, is on the conference web site.
Contents: introduction, publications, links to some implementations of the various algorithms. The web page...
Several modifications on my publication page:
Alternative links set up.
HTTP negotiation on the format (postscript or PDF) to be used for the main links.
Translations in the French page.
Because of a bug concerning the pipes under OpenMosix, my programs searching for worst cases for the exact rounding (see the introduction to the Table Maker's Dilemma) were sometimes giving incorrect results, that couldn't be detected a priori, on the ble.ens-lyon.fr cluster; I mentioned this problem in my slides (in French) of my presentation for the journées au vert SPACES 2004. It was probably due to a data loss in the communications by pipe between my programs and Maple. Most often, pipes (not only in my programs) were just freezing, without leading to incorrect results. After a new version of the kernel has been installed by the system administrators, new tests performed yesterday confirmed that these problems have completely disappeared.
Several years ago, a faulty memory of a file server caused errors in my programs, that were fortunately detected. As this kind of errors occur randomly, the tests will really have to be performed at least twice, on different machines.
Under Linux/x86, like some other JVMs, SableVM was computing internally in extended precision, though this is not allowed by the Java specification. Grzegorz B. Prokopski fixed this problem in the Debian package 1.1.6-4 by putting the FPU in double-precision rounding (in the right place in the C code). Thanks to him.
To my knowledge, SableVM is the first free JVM implementation to be fixed and now computing correctly.
For more information on this bug and the problems related to extended precision under Linux/x86, please see my page Linux and the Extended Precision on x86 Processors.
2004-06-30: Added the page Linux and the Extended Precision on x86 Processors.
2004-07-26: Added the Zaurus SL-C860 results on the page of the tests of mathematical functions of the standard C library.
2004-08-15: Added details for each machine for the page of the tests of mathematical functions of the standard C library.
Here's my blog on computer arithmetic and the research pages of my web site. I don't know yet how it will evolve... On a technical point of view, it is currently maintained with scripts and XSLT stylesheets. Concerning the contents, I may do a more general blog in the future, in which it will be integrated (with filtering by keywords). It should be both in English and in French.