IEEE binary floating-point

Starting with OS/390® V2R6 (including the Language Environment® and C/C++ components), support has been added for IEEE binary floating-point (IEEE floating-point) as defined by the ANSI/IEEE Standard 754-1985, IEEE Standard for Binary Floating-Point Arithmetic.
Notes:
  1. You must have OS/390 Release 6 or higher to use the IEEE Binary Floating-Point instructions. In Release 6, the base control program (BCP) is enhanced to support the new IEEE Binary Floating-Point hardware in the IBM® S/390® Generation 5 Server. This enables programs running on OS/390 Release 6 to use the IEEE Binary Floating-Point instructions and 16 floating-point registers. In addition, the BCP provides simulation support for all the new floating-point hardware instructions. This enables applications that make light use of IEEE Binary Floating-Point, and can tolerate the overhead of software simulation, to execute on OS/390 V2R6 without requiring an IBM S/390 Generation 5 Server.
  2. The terms binary floating point and IEEE binary floating point are used interchangeably. The abbreviations BFP and HFP, which are used in some function names, refer to binary floating point and hexadecimal floating point respectively.
  3. Under Hexadecimal Floating-Point format, the rounding mode is set to round toward 0. Under IEEE Binary Floating-Point format, the rounding mode is to round toward the nearest integer.

The z/OS® XL C/C++ compiler provides a FLOAT option to select the format of floating-point numbers produced in a compile unit. The FLOAT option allows you to select either IEEE Binary Floating-Point or hexadecimal floating-point format. For details on the z/OS XL C/C++ support, see the description of the FLOAT option in z/OS XL C/C++ User's Guide. In addition, two related sub-options have been introduced, ARCH(3) and TUNE(3). The two sub-options support the new G5 processor architecture, and IEEE binary floating-point data. Refer to the ARCHITECTURE and TUNE compiler options in z/OS XL C/C++ User's Guide for details.

The C/C++ runtime library interfaces, which formerly supported only hexadecimal floating-point format, have been changed in OS/390 V2R6 to support both IEEE Binary Floating-Point and hexadecimal floating-point formats. These interfaces are documented in the z/OS XL C/C++ Runtime Library Reference.

The primary documentation for the IEEE Binary Floating-Point support is contained in z/Architecture® Principles of Operation and z/OS XL C/C++ User's Guide.

IEEE binary floating point support provides interoperability and portability between platforms. It is anticipated that the support will be most commonly used for new and ported applications and in emerging environments, such as Java™. Customers should not migrate existing applications that use hexadecimal floating point to binary floating point, unless there is a specific reason.

IBM does not recommend mixing floating-point formats in an application. However, for applications which must handle both formats, the C/C++ runtime library does offer some support. Reference information for IEEE Binary Floating-Point can also be found in z/OS XL C/C++ Language Reference.