Decimal Arithmetic Specification, version 1.07
Copyright (c) IBM Corporation, 2002. All rights reserved. ©
6 Nov 2002
[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 ANSI/IEEE standard 854-1987,[1]  while supporting integer and unrounded floating-point arithmetic as a subset.

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. Additional explanatory material can be found in the article A Proposed Radix- and Word-length-independent Standard for Floating-point Arithmetic.[2] 

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[3]  (this provides the model for the unrounded floating-point rules).

Appendix B summarizes the design concepts behind the decimal arithmetic.

Appendix C summarizes 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, Joshua Bloch, Dirk Bosmans, Paul-Georges Crismer, Joe Darcy, John Ehrman, Kit George, Peter Golde, Brian Marks, Dave Raggett, and Fred Ris.
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] by W. J. Cody et al, published in the IEEE Micro magazine, August 1984, pp86–100.
[3] American National Standard for Information Technology – Programming Language REXX, X3.274-1996, American National Standards Institute, New York, 1996.

[contents | next]