Floating-point Arithmetic Precision for ItaniumŪ-based Systems

The following Intel® Fortran Compiler options enable you to control the compiler optimizations for floating-point computations on ItaniumŪ-based systems.

Contraction of FP Multiply and Add/Subtract Operations

-IPF_fma[-] enables or disables the contraction of floating-point multiply and add/subtract operations into a single operations. Unless -mp is specified, the compiler tries to contract these operations whenever possible. The -mp option disables the contractions.

-IPF_fma and -IPF_fma- can be used to override the default compiler behavior. For example, a combination of -mp and -IPF_fma enables the compiler to contract operations:

prompt>efc -mp -IPF_fma myprog.f

FP Speculation

-IPF_fp_speculationmode sets the compiler to speculate on floating-point operations in one of the following modes:

fast: sets the compiler to speculate on floating-point operations; this is the default.

safe: enables the compiler to speculate on floating-point operations only when it is safe;

strict: enables the compiler's speculation on floating-point operations preserving floating-point status in all situations. In the current version, this mode disables the speculation of floating-point operations (same as off).

off: disables the speculation on floating-point operations.

FP Operations Evaluation

-IPF_flt_eval_method{0|2} option directs the compiler to evaluate the expressions involving floating-point operands in the following way:

-IPF_flt_eval_method0 directs the compiler to evaluate the expressions involving floating-point operands in the precision indicated by the variable types declared in the program.

-IPF_flt_eval_method2 is not supported in the current version.

Controlling Accuracy of the FP Results

-IPF_fltacc disables the optimizations that affect floating-point accuracy. The  default is -IPF_fltacc- to enable such optimizations.

The ItaniumŪ compiler may reassociate floating-point expressions to improve application performance. Use -IPF_fltacc or -mp to disable or restrict these floating-point optimizations.

Flushing to Zero Denormal Values, -ftz[-]

Option -ftz[-] flushes denormal results to zero when the application is in the gradual underflow mode. Flushing the denormal values to zero with -ftz may improve performance of your application.

Note
Use this option if the denormal values are not critical to application behavior.

The default status of  -ftz[-] is OFF. By default, the compiler lets results gradually underflow.

Pro's and Con's

With the default -O2 option, -ftz[-] is OFF. The -O3 option turns -ftz[-] on. Note that -ftz[-] only needs to be used on the source that contains function main() to turn the FTZ mode on. The initial thread, and any threads subsequently created by that process, will operate in FTZ mode.

If the -ftz option produces undesirable results of the numerical behavior of your program, you can turn the FTZ mode off by using -ftz- in the command line while still benefiting from the -O3 optimizations:

prompt>efc -O3 -ftz- myprog.f