Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

IEEE floating-point arithmetic

&pagelevel(4)&pagelevel

The IEEE floating-point arithmetic is supported as follows:

For each compiler option you can activate all the IEEE functionality: the C/C++ compiler then generates floating-point numbers in IEEE format in all modules and automatically provides the appropriate IEEE functions for processing the IEEE floating-point numbers.

In addition, you can use the IEEE functionality provided in a modified form:

Notes on the use of IEEE floating point arithmetic

The following points must be noted when using IEEE floating point arithmetic:

  • IEEE floating point operations differ semantically from the corresponding /390 floating point operations, e.g. in rounding. In IEEE format, "Round to nearest" is used by default whereas "Round to zero" is used in /390 format.

  • In error and exception cases (e.g. argument outside permitted value range) the reactions of IEEE functions differ from those of /390 functions, e.g. some functions return the value NaN.

  • You must include the relevant include file for each C library function in your program that uses floating point numbers. Otherwise, these functions cannot process the floating point numbers correctly. You must, in particular, include the <stdio.h> include file with #include <stdio.h> for the printf function.