IBM Extension
IBM Extension
Floating-Point
- The sending item is converted first to an internal floating-point item, and then moved.
- When data is moved to or from an external floating-point item, the data is converted to or from its equivalent internal floating-point value.
- It is possible that when an external floating-point literal is moved to
an external floating-point data item, the external floating-point data item
can receive an inaccurate value. This is because the floating-point data type
is an approximation. When an external floating-point literal is moved, it
is first converted to a true floating-point value (IEEE), which can also affect
its accuracy.
For example, consider the following MOVE:
The displayed result of the MOVE is:77 external-float-1 PIC +9(3).9(13)E+9(3). MOVE +123455779012.3453E+297 to external-float-1. DISPLAY "EXTERNAL-FLOAT-1=" external-float-1.EXTERNAL-FLOAT-1=+123.4557790123452E+306
End of IBM Extension