The Euclidean Division Implemented with a Floating-Point Division and a Floor

Vincent Lefèvre 1
1 SPACES - Solving problems through algebraic computation and efficient software
INRIA Lorraine, LORIA - Laboratoire Lorrain de Recherche en Informatique et ses Applications
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. We also show that an intermediate extended precision can introduce errors and give a condition under which an extended precision has no effect on the results.
Complete list of metadatas

Cited literature [7 references]  Display  Hide  Download

https://hal.inria.fr/inria-00070403
Contributor : Rapport de Recherche Inria <>
Submitted on : Friday, May 19, 2006 - 8:23:25 PM
Last modification on : Thursday, January 11, 2018 - 6:20:00 AM
Long-term archiving on : Sunday, April 4, 2010 - 9:07:50 PM

Identifiers

  • HAL Id : inria-00070403, version 1

Collections

Citation

Vincent Lefèvre. The Euclidean Division Implemented with a Floating-Point Division and a Floor. [Research Report] RR-5604, INRIA. 2005, pp.16. ⟨inria-00070403⟩

Share

Metrics

Record views

157

Files downloads

269