COBOL includes support for the binary interchange formats, and for arithmetic using these formats, largely because that was the expressed desire of ISO/IEC JTC1/SC22/WG4 when it became clear that IEEE 754 was being revised to include formats of sufficient capacity for COBOL-sized numbers. |
With all this discussion about DECIMAL interchange formats, I haven't seen much mention of the BINARY interchange formats.
The COBOL standard strongly suggests that, given the inexactness and precision loss issues involved in radix conversion, and given the historically-decimal "nature" of COBOL, the use of ARITHMETIC IS STANDARD-BINARY might not be the very Best Choice for a programmer to make. It does allow it, and it does specify it as a "processor-dependent" feature.
IEEE 754 clearly provides for arithmetic directly using these formats, and the ability to declare data items in these formats is not the point here.
I'm wondering if the COBOL "drafting committee" should lobby WG4 to reverse its original decision, and drop ARITHMETIC IS STANDARD-BINARY altogether, relying only on STANDARD-DECIMAL-B and STANDARD-DECIMAL-D as the IEEE modes of arithmetic. Alternatively, STANDARD-BINARY could be marked it as archaic (there for the time being, but denigrated) or even marked obsolete (going away in the next revision). Either of the latter two would be a decidedly odd thing to do for a feature that's brand-new.
How much real-world support is there, or is there planned, for arithmetic using binary128 (the format of a standard-binary intermediate data item) directly?