Comparison between Binary and Decimal Floating-Point Numbers

Nicolas Brisebarre, Christoph Lauter, Marc Mezzarobba, Jean Michel Muller

Research output: Contribution to journalArticlepeer-review

Abstract

We introduce an algorithm to compare a binary floating-point (FP) number and a decimal FP number, assuming the 'binary encoding' of the decimal formats is used, and with a special emphasis on the basic interchange formats specified by the IEEE 754-2008 standard for FP arithmetic. It is a two-step algorithm: a first pass, based on the exponents only, quickly eliminates most cases, then, when the first pass does not suffice, a more accurate second pass is performed. We provide an implementation of several variants of our algorithm, and compare them.

Original languageEnglish
Article number7271015
Pages (from-to)2032-2044
Number of pages13
JournalIEEE Transactions on Computers
Volume65
Issue number7
DOIs
Publication statusPublished - 1 Jul 2016

Keywords

  • Floating-point arithmetic
  • binary arithmetic
  • comparisons
  • radix-10 arithmetic

Fingerprint

Dive into the research topics of 'Comparison between Binary and Decimal Floating-Point Numbers'. Together they form a unique fingerprint.

Cite this