Decimal Arithmetic Specification, version 1.66
Copyright (c) IBM Corporation, 2007. All rights reserved. ©
13 Mar 2007
[contents | next]

Introduction

This document defines a general purpose decimal arithmetic. A correct implementation of this specification is a decimal arithmetic which conforms to the requirements of the IEEE standard 854-1987,[1]  while supporting integer and unrounded floating-point arithmetic as subsets.

Note that IEEE 854 is being merged with the IEEE 754-1985 standard[2]  as part of the ongoing revision,[3]  and this specification will track that revision. Parts of this document are therefore subject to change. As of July 2003 only minor changes are expected; the principles of unnormalized values and arithmetic have been agreed by the 754 committee.

The primary audience for this document is implementers, so examples and other explanatory material are included. Explanatory material is identified as Notes, Examples, or footnotes, and is not part of the formal specification.

Appendix A describes a simplified subset of the full arithmetic which implements the decimal floating-point arithmetic defined in the ANSI standard X3.274-1996[4]  (this provides the model for the unrounded floating-point rules). Appendix B summarizes the design concepts behind the decimal arithmetic. Appendix C lists the changes to this specification.

This document in various softcopy formats, together with a reference implementation, testcases, proposed concrete representations, and background information may be found at http://www2.hursley.ibm.com/decimal

Comments on this draft are welcome. Please send any comments, suggestions, and corrections to the author, Mike Cowlishaw (mfc@uk.ibm.com).

Acknowledgements

Very many people have contributed to the arithmetic described in this document, especially the 1980 Rexx Language Committee, the IBM Rexx Architecture Review Board, the IBM Vienna Compiler group, the X3 (now NCITS) J18 technical committee, the authors of the IEEE 854 standard, and the members of the current IEEE 754r (revision) committee. Special thanks for their contributions to the current design and this document are due to Aahz, Merav Aharoni, Nelson Beebe, Joshua Bloch, Dirk Bosmans, Paul-Georges Crismer, Joe Darcy, Gunnar Degnbol, John Ehrman, Kit George, Peter Golde, Brian Marks, Ilan Nehama, Dave Raggett, Fred Ris, Eric Schwarz, and Phil Yeh.
Footnotes:
[1] IEEE 854-1987 – IEEE Standard for Radix-Independent Floating-Point Arithmetic, The Institute of Electrical and Electronics Engineers, Inc., New York, 1987.
[2] IEEE 754-1985 – IEEE Standard for Binary Floating-Point Arithmetic, The Institute of Electrical and Electronics Engineers, Inc., New York, 1985.
[3] See: http://grouper.ieee.org/groups/754/
[4] American National Standard for Information Technology – Programming Language REXX, X3.274-1996, American National Standards Institute, New York, 1996.

[contents | next]