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.

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.

]]>`mpfr_strtofr`

function can return an incorrect ternary value in the round-to-nearest mode (`MPFR_RNDN`

).
]]>`mpfr_*printf`

) yield an undefined behavior or assertion failure when a precision less than −1 is given as an argument for the C++11 compatibility.

Bug fixes (detailed list on the MPFR 3.1.4 page and

`ChangeLog`file).More tests.

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

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.

`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 second GNU MPFR 3.1.4 release candidate is also available.

]]>Distribution). ]]>

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