A Software Implementation of the IEEE 754R Decimal Floating-Point Arithmetic Using the Binary Encoding Format

Marius Cornea, John Harrison, Cristina Anderson, Ping Tak Peter Tang, Eric Schneider, Evgeny Gvozdev. IEEE Transactions on Computers, vol. 58 (2009), pp. 148--162.

Abstract:

The IEEE Standard 754-1985 for Binary Floating-Point Arithmetic was revised, and an important addition is the definition of decimal floating-point arithmetic. This is intended mainly to provide a robust, reliable framework for financial applications that are often subject to legal requirements concerning rounding and precision of the results, because the binary floating-point arithmetic may introduce small but unacceptable errors. Using binary floating-point calculations to emulate decimal calculations in order to correct this issue has led to the existence of numerous proprietary software packages, each with its own characteristics and capabilities. IEEE 754R decimal arithmetic should unify the ways decimal floating-point calculations are carried out on various platforms. New algorithms and properties are presented in this paper which are used in a software implementation of the IEEE 754R decimal floating-point arithmetic, with emphasis on using binary operations efficiently. The focus is on rounding techniques for decimal values stored in binary format, but algorithms are outlined for the more important or interesting operations of addition, multiplication, division, including the case of non-homogeneous operands, as well as conversions between binary and decimal floating-point formats. Performance results are included for a wider range of operations, showing promise that our approach is viable for applications that require decimal floating-point calculations. This paper extends an earlier publication.

PDF

Bibtex entry:

@ARTICLE{cornea-decimal,
        author          = "Marius Cornea and John Harrison and
                           Cristina Anderson and Ping Tak Peter Tang and
                           Eric Schneider and Evgeny Gvozdev",
        title           = "A Software Implementation of the {IEEE} {754R}
                           Decimal Floating-Point Arithmetic Using the
                           Binary Encoding Format",
        journal         = "IEEE Transactions on Computers",
        volume          = 58,
        year            = 2009,
        pages           = "148--162"}