Decimal Arithmetic Specification, version 1.08 Copyright (c) IBM Corporation, 2003. All rights reserved. © | 8 Jan 2003
[previous | contents]

# Appendix C – Changes

This appendix is not part of the specification. It documents changes to the combined arithmetic specification, including changes to the earlier two-layer specifications.

Changes with draft number 0.nn refer to changes in the original base specification since the first public draft of that specification (0.65, 26 Jul 2000).

Changes with draft number x.nn (for example, x.40) refer to changes in the original extended specification (inserted in their chronological position) since the first public draft of that specification (0.30, 9 Aug 2000).

Changes with version number 1.nn refer to changes in the combined arithmetic specification.

#### Changes in Draft 0.66 (28 Jul 2000)

- The rules constraining any limits applied to the exponent of a number have been added.
- Minor corrections and clarifications have been added.

#### Changes in Draft 0.69 (9 Aug 2000)

- A number produced by the to-number conversion operation has a sign of zero if the coefficient is 0; similarly, arithmetic operations cannot produce a result of `-`0. These rules allow concrete representations comprising two simple integers. Note that the Extended specification provides a mechanism for preserving and producing `-`0.
- The Exceptional conditions section has been extended to separate out more exceptions and to align them with IEEE 854.
- The names of some operations have been changed to achieve a consistent style.
- Minor corrections and clarifications have been added.

#### Changes in Draft 0.74 (27 Nov 2000)

- The rules constraining the limits applied to the exponent of a number have been corrected (Emin did not take into account the length of the coefficient).
- The rules for converting a number to a scientific string have been rephrased and corrected (the previous rules incorrectly converted some zero values).
- The Exceptional conditions section has been alphabetized, and the Invalid context condition has been added.
- Minor corrections, clarifications, and additional examples have been added.

#### Changes in Draft 0.81 (5 Jan 2001)

- The round-down (truncation) rounding algorithm has been added.
- The rules constraining the right-hand operand of the power operation have been clarified, and the Invalid operation condition has been added for reporting errors.
- The rules for reporting underflow or overflow during a power operation to a negative power have been specified.
- The rules for preserving integers and removing insignificant zeros have been clarified.
- Minor clarifications and additional examples have been added.

#### Changes in Draft x.40 (14 May 2001)

- The Exceptional conditions section has been revised and sorted. Additional cases where the Invalid operation condition can be raised have been identified, and the Invalid context condition has been added.
- Subnormal numbers are explicitly permitted as operands and for results, provided that special values are also permitted.
- The string representations of NaN values have been changed to conform to recent discussions of the IEEE 754R committee (further changes may be necessary).
- Minor corrections and clarifications have been made.

#### Changes in Draft 0.83 (25 May 2001)

- The significand of a number has been renamed from integer to coefficient, to remove possible ambiguities.
- The rescale operation has been added, because it is available in most existing implementations in some form and is required for many formatting operations. It needs to be part of the base specification because it uses the parameters of the context.
- The treatment of zeros with exponents or fractional parts in the to-number conversion has been corrected.
- Minor clarifications and editorial changes have been made.

#### Changes in Draft x.41 (25 May 2001)

- The significand of a number has been renamed from integer to coefficient, to remove possible ambiguities.
- The treatment of zeros with exponents or fractional parts in to-extended-number has been clarified.

#### Changes in Draft x.43 (28 June 2001)

- The rounded condition (with associated signal and trap-enabler) has been added.

#### Changes in Draft x.52 (15 October 2001)

- The special-values flag in the context has been renamed extended-values to better reflect its effect and avoid confusion (the term special values refers only to infinities and NaNs).
- In order to permit more efficient implementations, the specification no longer requires that special and extended values raise an Invalid operation condition if a context with a extended-values of 0 is in use.
- For the same reason, extended zeros can no longer have non-zero exponents; in extended operations the precision of a zero should be ignored.
- Similarly, NaNs can no longer have a sign of 1. (An implementation can allow signed NaNs, but they would not be visible using the conversions specified.)
- The string conversion from `[0,sNaN]` has been changed to `"sNaN"`, as proposed in recent IEEE 754R discussions.
- Minor corrections and clarifications have been made, and additional examples have been added.

#### Changes in Draft 0.86 (30 October 2001)

- If the divisor of the remainder operation is 0, an Invalid operation condition is raised (instead of Division by zero), for compatibility with IEEE 854.
- Minor clarifications and editorial changes have been made.

#### Changes in Draft x.57 (28 November 2001)

- The operation of the power and rescale operators has been clarified.
- The behaviors of the Overflow and Underflow exceptional conditions have been clarified.
- The trap-result parameter of the context has been removed, as it is no longer needed for the exceptional conditions as specified.
- Additional cases where a result of –0 is possible have been documented.
- Minor corrections and clarifications have been made, additional examples have been added, and differences from IEEE 854 have been identified.

#### Changes in Draft 0.87 (23 April 2002)

- The definition of the rescale operation has been changed so the the exponent is always set as specified, even if the coefficient is 0.
- Minor clarifications and editorial changes have been made.

#### Changes in Draft x.58 (23 April 2002)

- The operation of the rescale operator has been extended to match the base specification (the exponent is now always set as given, even if the coefficient is 0).

#### Changes in Draft 1.00 (5 July 2002)

This version combines the original base and extended specifications. There are necessarily extensive editorial changes. In addition, the following significant technical changes have been made:

- The abs, max, min, and trim operators have been added.
- A precision setting may now have a lower bound as well as an upper bound. This permits ‘fixed precision’ implementations, for example, in hardware.
- The symbols Emin and Emax have been redefined to match the usage in IEEE 854 (that is, they now refer to the adjusted exponent).
- The divide operator no longer trims trailing zeros automatically. The trim operator has been added to provide this capability independently.
- The calculation of the sign, coefficient, and exponent has been separately detailed for addition, subtraction, multiplication, and division.
- Zero values accepted by to-number and produced by various operations may now have a non-zero exponent.
- The rescale operator now accepts a infinite left-hand operand. This has allowed the round-to-integer operator to be defined as a special case of rescale.
- The power operator is marked as ‘under review’; it may be redefined or removed in a later version. (It is currently included because it defines the results as presented in `power.decTest`.)

#### Changes in Draft 1.03 (1 September 2002)

- The specification allowed subnormal numbers to be more precise than permitted by IEEE 854. It has been changed to enforce a minimum exponent of Etiny; this exponent will also be used when a conversion or calculation underflows to zero.
- The Underflow condition is now raised according to the IEEE 854 untrapped underflow criteria (instead of according to the IEEE 854 trapped criteria). That is, underflow is now only raised when a result is both subnormal and inexact.
- The Subnormal condition has been added, to allow detection of subnormal results even if Underflow is not raised.
- If an overflow or underflow occurs, the Overflow or Underflow conditions are raised, respectively, instead of special conversion conditions. This aligns the specification more closely with IEEE 854.
- The power operator has been changed to allow subnormals after raising a number to a negative power.
- The to-number conversion has been enhanced to round the converted coefficient (if necessary) instead of raising overflow.
- Minor clarifications and editorial changes have been made.

#### Changes in Draft 1.06 (9 October 2002)

- The normalize operation has been added; it reduces a number to a canonical form. (This replaces the trim operator, which only removed trailing fractional zeros.)
- The definition of the squareroot operation has been simplified and now returns a result which is independent of the rounding mode in the context. This allows simpler implementations, and also allows the use of Hull and Abrham's variable-precision algorithm.[1]
- Input operands to the arithmetic operations are no longer rounded before use (this rounding, and the associated Lost digits condition, can therefore only occur in the X3.274 subset arithmetic). This change aligns the arithmetic with Java unlimited arithmetic, and also significantly simplifies hardware implementations which provide precision control.
- Minor clarifications and editorial changes have been made.

#### Changes in Draft 1.08 (14 November 2002)

- The description of the compare operation has been clarified; its result is always exact and unrounded.
- Two errors in the description of the divide operation have been corrected (‘dividend’ and ‘divisor’ were swapped in the second While loop, and the calculation of the exponent when the dividend is zero was described incorrectly).

Footnotes:

[1] | See Properly Rounded Variable Precision Square Root, T. E. Hull and A. Abrham, ACM Transactions on Mathematical Software, Vol 11 #3, pp229-237, ACM, September 1985.

[previous | contents]