On Ziv's rounding test

Abstract : 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 f(x). The same test may be used when implementing floating-point operations with input and output operands of different formats, using arithmetic operators tailored for manipulating operands of the same format. That test depends on a "magic constant" e. We show how to choose that constant e to make the test reliable and efficient. Various cases are considered, depending on the availability of an fma instruction, and on the range of f (x).
Document type :
Preprints, Working Papers, ...
Complete list of metadatas

Contributor : Jean-Michel Muller <>
Submitted on : Wednesday, May 2, 2012 - 1:55:57 PM
Last modification on : Friday, August 31, 2018 - 9:25:53 AM
Long-term archiving on : Monday, November 26, 2012 - 4:05:18 PM


Files produced by the author(s)


  • HAL Id : ensl-00693317, version 1


Florent de Dinechin, Christoph Lauter, Jean-Michel Muller, Serge Torres. On Ziv's rounding test. 2012. ⟨ensl-00693317v1⟩



Record views


Files downloads