Compiler options affect the accuracy, performance, and potentially the correctness of floating-point calculations. Although the default values for the options have been chosen to provide efficient and correct execution of most programs, some applications may require nondefault options to reproduce results reported by other hardware. You should read this and related pages before using the floating-point options.
By default, IBM C/C++ Compilers produces object code that evaluates floating-point expressions in double precision, even if all operands in an expression are single precision. The results of expressions are then rounded to single precision if they are assigned to float variables.
Other C compilers might evaluate floating-point expressions in single precision where such an evaluation is permitted by the language definition. This implementation is preferred on machines where single-precision operations are faster than double-precision operations.
In general, floating-point results from programs compiled using IBM C/C++ Compilers and executed on the RISC System/6000 system are more accurate than those from other implementations, because of the higher precision used for intermediate results and the use of maf operations.
-qfloat=nomaf
-qfloat=hssngl
-qfloat=nans
-qfloat=hsflt
-qfloat=rndsngl
-qflttrap
float Compiler Option
flttrap Compiler Option