# Emulation of a FMA and Correctly Rounded Sums: Proved Algorithms Using Rounding to Odd

@article{Boldo2008EmulationOA, title={Emulation of a FMA and Correctly Rounded Sums: Proved Algorithms Using Rounding to Odd}, author={Sylvie Boldo and Guillaume Melquiond}, journal={IEEE Transactions on Computers}, year={2008}, volume={57}, pages={462-471} }

Rounding to odd is a nonstandard rounding on floating-point numbers. By using it for some intermediate values instead of rounding to nearest, correctly rounded results can be obtained at the end of computations. We present an algorithm for emulating the fused multiply-and-add operator. We also present an iterative algorithm for computing the correctly rounded sum of a set of floating-point numbers under mild assumptions. A variation on both previous algorithms is the correctly rounded sum of…

## 49 Citations

### On the Computation of Correctly-Rounded Sums

- Computer ScienceIEEE Symposium on Computer Arithmetic
- 2009

It is shown that among the set of the algorithms with no comparisons performing only floating-point additions/subtractions, the 2Sum algorithm introduced by Knuth is minimal, both in terms of number of operations and depth of the dependency graph.

### Sipe: a Mini-Library for Very Low Precision Computations with Correct Rounding

- Computer Science
- 2013

Sipe is a mini-library in the form of a C header file, to perform radix-2 floating-point computations in very low precisions with correct rounding, either to nearest or toward zero. The goal of such…

### On the Computation of Correctly Rounded Sums

- Computer ScienceIEEE Transactions on Computers
- 2009

In radix-2 floating-point arithmetic, it is proved that under reasonable conditions, an algorithm performing only round-to-nearest additions/subtractions cannot compute the round- to-NEarest sum of at least three floating- point numbers.

### Formal Verification of Programs Computing the Floating-Point Average

- Computer ScienceICFEM
- 2015

This article presents and formally proves a new algorithm that computes the correct rounding of the average of two floating-point numbers, which is more accurate than the previous one and is correct whatever the inputs.

### CPFloat: A C library for emulating low-precision arithmetic∗

- Computer Science
- 2020

CPFloat is a C library that offers efficient routines for rounding arrays of binary32 and binary64 numbers to lower precision, and is currently the most efficient and complete library for experimenting with custom low-precision floating-point arithmetic available in any language.

### One Polynomial Approximation to Produce Correctly Rounded Results of an Elementary Function for Multiple Representations and Rounding Modes

- Computer Science
- 2021

This paper proposes a novel method to generate a single polynomial approximation that produces correctly rounded results for all inputs for multiple rounding modes and multiple precision configurations and is the first 32-bit float library that produces incorrectly rounded results with all rounding modes in the IEEE standard.

### One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modes

- Computer ScienceProc. ACM Program. Lang.
- 2022

This paper proposes a novel method to generate a single polynomial approximation that produces correctly rounded results for all inputs for multiple rounding modes and multiple precision configurations and is the first 32-bit float library that produces incorrectly rounded results with all rounding modes in the IEEE standard.

### A Correctly-Rounded Fixed-Point-Arithmetic Dot-Product Algorithm

- Computer Science2020 IEEE 27th Symposium on Computer Arithmetic (ARITH)
- 2020

This article describes an algorithm that computes a correctly-rounded sum of products from inputs whose format is known in advance, and relies on odd rounding (that is easily implemented in hardware) and comes with a careful proof and some cost analysis.

### On Ziv's rounding test

- Computer ScienceTOMS
- 2013

A very simple test, introduced by Ziv, allows one to determine if an approximation to the value f(x) of an elementary function at a given point x suffices to return the floating-point number nearest…

### Verified Compilation of Floating-Point Computations

- Computer ScienceJournal of Automated Reasoning
- 2014

This paper reports on the recent success in formally specifying and proving correct CompCert’s compilation of floating-point arithmetic and obtains the first formally verified compiler that provably preserves the semantics offloating-point programs.

## References

SHOWING 1-10 OF 29 REFERENCES

### When double rounding is odd

- Computer Science
- 2005

It is proved that the double rounding then gives the correct rounding to the nearest value using the Coq automatic proof checker, and this rounding is unusual and this property is surprising.

### Multistep Gradual Rounding

- Computer Science, EngineeringIEEE Trans. Computers
- 1989

The author introduces a rounding procedure called gradual rounding that is very similar to conventional rounding with the addition of two tag bits associated with each floating-point register.

### When is double rounding innocuous?

- Computer ScienceSGNM
- 1995

Double rounding is the phenomenon that occurs when the result of an operation is rounded to fit some intermediate destination, and then again when delivered to its final destination. This can be a…

### Formally certified floating-point filters for homogeneous geometric predicates

- Computer ScienceRAIRO Theor. Informatics Appl.
- 2007

This paper studies a floating-point implementation of a filter for the orientation-2 predicate, and how a formal and partially automatized verification of this algorithm avoided many pitfalls.

### Pitfalls of a Full Floating-Point Proof: Example on the Formal Proof of the Veltkamp/Dekker Algorithms

- Computer ScienceIJCAR
- 2006

The aim of this article is to show the difficulties of a strong justification of the validity of these algorithms for a generic radix and even when Underflow or Overflow occurs.

### Algorithms for arbitrary precision floating point arithmetic

- Computer Science[1991] Proceedings 10th IEEE Symposium on Computer Arithmetic
- 1991

The author presents techniques for performing computations of very high accuracy using only straightforward floating-point arithmetic operations of limited precision, and an algorithm is presented which computes the intersection of a line and a line segment.

### Fast and Accurate Floating Point Summation with Application to Computational Geometry

- Computer ScienceNumerical Algorithms
- 2004

The results show that in the absence of massive cancellation (the most common case) the cost of guaranteed accuracy is about 30–40% more than the straightforward summation, and the accurate summation algorithm improves the existing algorithm by a factor of two on a nearly coplanar set of points.

### Worst cases for correct rounding of the elementary functions in double precision

- PhysicsProceedings 15th IEEE Symposium on Computer Arithmetic. ARITH-15 2001
- 2001

The design of reasonably fast routines that will compute these functions with correct rounding, at least in some interval, for any of the four rounding modes specified by the IEEE-754 standard are proposed.

### Fast and correctly rounded logarithms in double-precision

- Computer ScienceRAIRO Theor. Informatics Appl.
- 2007

This article is a case study in the implementation of a portable, proven and efficient correctly rounded elementary function in double-precision using the crlibm library to get performance equivalent to the best current mathematical libraries.

### Basic building blocks for a triple-double intermediate format

- Computer Science
- 2005

The implementation of correctly rounded elementary functions needs high intermediate accuracy before final rounding. This accuracy can be provided by (pseudo-) expansions of size three, i.e. a…