Status of the GNU MPFR Trunk

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 for GNU MPFR 3.1.5

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 for GNU MPFR 3.1.5

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).

GNU MPFR 3.1.5 is Released

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 for GNU MPFR 3.1.4

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 for GNU MPFR 3.1.4

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).

My ARITH-23 Article and Slides: Correctly Rounded Arbitrary-Precision Floating-Point Summation

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 for GNU MPFR 3.1.4

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 for GNU MPFR 3.1.4

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.

GNU MPFR 3.1.4 is Released

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 for GNU MPFR 3.1.3 and GNU MPFR 3.1.4 Release Candidate 2

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 for GNU MPFR 3.1.3

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.

Worst Cases for the Correct Rounding of Math Functions Now Public

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

).

Small Program to Test Some Floating-Point Optimizations by a C Compiler

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 for GNU MPFR 3.1.3

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.

webmaster@vinc17.org