_EDC_IEEEV1_COMPATIBILITY_ENV

In 1999, the C/C++ Runtime Library provided IEEE754 floating-point arithmetic support in support of IBM®’s Java™ group. The Java language had a bit-wise requirement for its math library, meaning that all platforms needed to produce the same results as Sun Microsystems’ fdlibm (Freely Distributed LIBM) library. Therefore, Sun Microsystems’ fdlibm code was ported to the C/C++ Runtime Library to provide IEEE754 floating-point arithmetic support. Subsequent to the C/C++ Runtime Library’s 1999 release of IEEE754 floating-point math support, IBM’s Java group provided their own support of IEEE754 floating point arithmetic and no longer use the C/C++ Runtime Library for this support.

Beginning in z/OS® V1R9, a subset of the original fdlibm functions are being replaced by new versions that are designed to provide improved performance and accuracy. The new versions of these functions are replaced at the existing entry points. However, as a migration aid, IBM has provided new entry points for the original fdlibm versions. Applications that take no action will automatically use the updated functions. There are two methods for accessing the original functions.

The first method is through an environment variable, described here, that can be used by applications that do one of the following:
  • Do not include <math.h>.
  • Include <math.h> and define the _FP_MODE_VARIABLE feature test macro.

Either of the above will cause the application to be running in what is called "variable" mode with respect to floating-point math functions called within the compile unit.

The second method is through the _IEEEV1_COMPATIBILITY feature test macro and is used for applications that include <math.h> and do not define the _FP_MODE_VARIABLE feature test macro. See z/OS XL C/C++ Runtime Library Reference for more details.

If the application conforms to the rules of the first method, then this environment variable can be used to access the original fdlibm versions of the functions shown in Table 1.
Table 1. Original versions of fdlibm functions
acos() acosh() asin() asinh() atan() atanh() atan2()
cbrt() cos() cosh() erf() erfc() exp() expm1()
gamma() hypot() lgamma() log() log1p() log10() pow()
rint() sin() sinh() tan() tanh()    
This environment variable will only take effect if the application is running in "variable" mode. The following list shows the acceptable values of the environment variable and the behavior for each value:
ON
Original versions of fdlibm functions are used.
other values
The new versions of the functions are used. This is the default.
If the application has used __fp_setmode() to switch over to hexadecimal floating-point mode, the hexadecimal versions of the functions will be called no matter the setting of the environment variable.