Output operations and SELECT WHEN

advertisement
OWG-1/29-0322
09 May 2011
Page 1 of 2
Subject:
Increase precision limit for non-IEEE floating-point from 34 to 37
Author:
Charles C. Stevens
Document references:
1) ISO/IEC 1989:20xx FCD 1.1
2) IEEE Std 754-2008, IEEE Standard for Floating-Point Arithmetic
3) OWG-1/29-0313, Editorial name change for IEEE binary floating-point items
Previous versions of document: NONE
Justification:
In the FCD, the number of digits in the significand portion of a floating-point numeric-edited
data item and for a floating-point literal is limited to 34. Since the maximum significand value
in an item described with FLOAT-BINARY-34 requires 36 digits (as noted in reference 3), and
since the original presumption was that limit was 34 (as for FLOAT-DECIMAL-34), the limit is
inappropriate. Moreover, for conformance with IEEE Std 754-2008 rounding rules, an extra
digit is required for such items.
Accordingly, the precision limit for the two forms of display-form representations of floatingpoint values is increased from 34 to 37.
Recommended changes:
1) Page 83, 8.3.1.2.2.2, Floating-point numeric literals, rule 2: Replace the second
sentence with "The significand shall be from 1 to 37 digits in length."
2) Page 346, 13.18.39.2, PICTURE clause, syntax rule 12: Replace all text with the
following:
For floating-point data items of category numeric-edited, the number of digit
positions in the significand shall range from 1 through 37.
3) Page 686, 15.62, NUMVAL function, Argument rule 4: Replace all text with the
following:
If standard-binary arithmetic is in effect, the total number of digits in argument-1
shall not exceed 36. If standard-decimal arithmetic is in effect, the total number
of digits in argument-1 shall not exceed 34.
09 May 2011
OWG-1/29-0322
Page 2 of 2
4) Page 689, 15.63, NUMVAL-C function, Argument rule 8: Replace all text with the
following:
If standard-binary arithmetic is in effect, the total number of digits in argument-1
shall not exceed 36. If standard-decimal arithmetic is in effect, the total number
of digits in argument-1 shall not exceed 34.
5) Page 691, 15.64, NUMVAL-F function, Argument rule 3: Replace all text with the
following:
If standard-binary arithmetic is in effect, the total number of digits in the
significand of argument-1 shall not exceed 36. If standard-decimal arithmetic is
in effect, the total number of digits in the significand of argument-1 shall not
exceed 34.
6) Page 713, 15.86, TEST-NUMVAL function, Returned value rule 2 subrule b: Delete
NOTE 3 and replace with the following:
NOTE 3 If standard-binary arithmetic is in effect, and the argument has more
than 36 digits, the returned value is the position of the 37th digit if no prior error
has been found.
NOTE4 If standard-decimal arithmetic is in effect, and the argument has more
than 34 digits, the returned value is the position of the 35th digit if no prior error
has been found.
7) Page 715, 15.87, TEST-NUMVAL-F function, Returned vaue rule 1 subrule b: Replace
NOTE 4 with the following two NOTEs, renumbering existing Notes 5 and 6 accordingly:
NOTE 4a In the event that standard-binary arithmetic is in effect, the argument
contains a significand longer than 36 digits, and no prior error in the argument
has been found, the returned value is the position of the 37th digit of the
significand because the character in error for a significand longer than 36 digits
is the 37th digit.
NOTE 4b In the event that standard-decimal arithmetic is in effect, the
argument contains a significand longer than 34 digits, and no prior error in the
argument has been found, the returned value is the position of the 35th digit of
the significand because the character in error for a significand longer than 34
digits is the 35th digit.
Download