Output operations and SELECT WHEN

advertisement
WG 4 N 0315
OWG-1/29-0296
29 April 2011
Page 1 of 2
Subject:
Summary of controversies relating to IEEE Std 754-2008
Author:
Charles C. Stevens
Document references:
1) ISO/IEC 1989:20xx FCD 1.0
2) IEEE Std 754-2008, IEEE Standard for Floating-Point Arithmetic
Summary:
In the course of investigation of US comments 51 and 52, it became clear to OWG-1 that the
specifications involving IEEE floating-point usages were insufficient to answer the concerns
raised in those comments. Subsequent correspondence with the IEEE working group while
working toward concrete answers and toward clarifying these questions revealed that our
specification of COBOL's support of IEEE Std 754-2008 was significantly incorrect in that:
1) When these specifications were first written, the distinctions between the binary and
decimal encodings were not fully understood by the authors relative to precision
considerations in each mode. This led to the specification in the FCD that for decimal
formats only the decimal encoding was permitted. The binary encoding of decimal
formats incurs no risk of precision loss that the decimal encoding does not also incur.
Implementors are successfully using the binary encoding interoperably for such decimal
formats. Because some implementations use both formats interoperably, it is necessary
to provide for distinctions between them in data declaration entries.
2) During that investigation, it was determined by OWG-1 that the detailed specifications of
intermediate processes and intermediate formats could preclude a conforming compiler
on some widely-used platforms.
3) The specifications for the MOVE statement were incompatible with the provisions of
IEEE Std 754-2008 in some areas, particularly with regard to exception reporting and the
expected results for overflow and underflow in conversion from one format to another.
The recent discussions, both within OWG-1 and on the IEEE 754 working-group mailing list (in
particular, Dan Zuras, chair of said working group, Mike Cowlishaw, editor of Reference 2, and
several others) have produced a consensus within the OWG that these flaws are significant
and would prevent consistent implementation of this edition of the standard.
OWG-1 believes that failing to provide resolutions to these issues in the current revision would
result in a standard whose conformance and compliance with IEEE Std 754-2008 would be
compromised for future revisions. Providing these resolutions in the current revision furthers
OWG-1's goal of minimizing the areas in which the COBOL standard cannot claim compliance.
OWG-1 proposes that the FCD be modified to:
WG 4 N 0315
OWG-1/29-0296
29 April 2011
Page 2 of 2
1) Remove the bias within the standard against the binary encoding of IEEE decimal
floating-point numbers. Provide additional phrases for data declaration entries to allow
for the complete specification of the format of an IEEE floating-point item.
2) Make implementor-defined the intermediate specifications for modes of arithmetic that
are compliant with IEEE Std 754-2008. Only the results in those modes of arithmetic
are defined as specified in IEEE Std 754-2008.
3) Revise the MOVE statement rules so that the results are more consistent with IEEE 754
specifications. .
Proposals to resolve these concerns:
These proposals have been reviewed extensively by OWG-1 and are nearing completion.
In the development of these proposals, OWG-1 has had three primary goals: 1) avoid any
changes that might affect current behavior; 2) ensure that handling of IEEE floating-point
items was, where possible, consistent with the specifications in Reference 2; and 3) avoid any
changes that would preclude the ability to claim conformance to IEEE Std 754-2008 in a future
COBOL standard.
These proposals are under continuous review; see the current OWG-1 document register at
http://www.cobolstandard.info/wg4-owg1/document.html
for any updates.
As of this writing, the current versions of these proposals are:
Proposal 1a:
Proposal 1b:
Proposal 2:
Proposal 3:
02-0289, Specification of IEEE format details in inappropriate locations
02-0287, Variations in representation of IEEE formats
02-0280, Disassociation of IEEE formats from SBIDI and SDIDI
02-0288, MOVE statement GR5 simplification
Proposal 1a establishes the definitions for SBIDI (Standard-binary intermediate data item) and
SDIDI (standard-decimal intermediate item) and uses those terms throughout the standard in
referencing both those items and the Binary128 and Decimal128 formats when the latter
references actually refer to them. It is considered prerequisite to the other proposals, but
makes no substantive changes.
Proposal 1b adds additional syntax to address the underspecification described in concern 1.
Proposal 2 is primarily intended to address Concern 2, and also addresses Concern 1 as it
applies to SBIDI and SDIDI.
Proposal 3 is intended to address Concern 3.
Download