-qfloat

In IBM® XL C/C++ for AIX® 16.1.0 or earlier releases, the -qfloat option selects different strategies for speeding up or improving the accuracy of floating-point calculations. The majority of -qfloat suboptions do not have functionally equivalent options in IBM Open XL C/C++ for AIX 17.1.4.

If you specified -qfloat when compiling your program with IBM XL C/C++ for AIX 16.1.0 or earlier releases, consider the following guidelines when migrating your program to IBM Open XL C/C++ for AIX 17.1.4:
  • The -ffp-model=strict option ensures correct compiler behavior but disables almost all floating-point optimizations. Use this option with discretion.
  • Aspects of -qfloat=[no]fenv that pertain to rounding mode can be controlled via -f[no-]rounding-math. Similarly, aspects of -qfloat=[no]fenv that pertain to exception behaviors can be controlled via -ffp-exception-behavior.
  • In IBM XL C/C++ for AIX 16.1.0 or earlier releases, the -qfloat=[no]fold option could evaluate constant floating-point expressions at compile time. In IBM Open XL C/C++ for AIX 17.1.4, you can use the -f[no-]rounding-math option to control constant folding in some cases, but this option affects more than just constant folding and might have performance and accuracy implications that go beyond what -qfloat=[no]fold controlled.
  • In IBM XL C/C++ for AIX 16.1.0 or earlier releases, the -qfloat=[no]hscmplx option could speed up operations that involve complex division and complex absolute value, and the -qfloat=[no]hsflt option could speed up calculations by preventing rounding for single-precision expressions and by replacing floating-point division by multiplication with the reciprocal of the divisor. In IBM Open XL C/C++ for AIX 17.1.4, use the -f[no-]rounding-math option to control optimizations that might result in different rounding behaviors and use the -f[no-]reciprocal-math option to control replacement of divide operations with a multiplication of the numerator by the reciprocal of the denominator.
  • In IBM XL C/C++ for AIX 16.1.0 or earlier releases, the -qfloat=[no]nans allowed you to use the -qflttrap=invalid:enable option to detect and deal with exception conditions that involve signaling NaN (not-a-number) values. In IBM Open XL C/C++ for AIX 17.1.4, use the -ffp-exception-behavior option to control some aspects of the semantics controlled by -qfloat=[no]nans, but the impact goes beyond just signaling NaNs. Furthermore, unlike IBM XL C/C++ for AIX 16.1.0 or earlier releases, there is no way to control exceptions when converting an SNaN from single to double precision in IBM Open XL C/C++ for AIX 17.1.4.
  • In IBM XL C/C++ for AIX 16.1.0 or earlier releases, the -qfloat=[no]rsqrt speeded up some calculations by replacing division by the result of a square root with multiplication by the reciprocal of the square root. In IBM Open XL C/C++ for AIX 17.1.4, use the -f[no-]reciprocal-math option to achieve a similar effect, but the impact goes beyond just division by the square root.
  • The -qfloat=[no]spnans option was deprecated and replaced with -qfloat=nans. Consider the migration guidelines of -qfloat=[no]nans if you used -qfloat=[no]spnans to compile your program.

Related information