fp-port, Qfp-port

Rounds floating-point results after floating-point operations.

IDE Equivalent

Windows: C/C++ > Optimization > Floating-point Precision Improvements

Linux: Floating Point > Round Floating-Point Results

Mac OS: Floating Point > Round Floating-Point Results

Architectures

IA-32 architecture, Intel® 64 architecture

Syntax

Linux and Mac OS: -fp-port
-no-fp-port
Windows:  /Qfp-port
/Qfp-port-

Arguments

None

Default

-no-fp-port or
/Qfp-port-
The default rounding behavior depends on the compiler’s code generation decisions and the precision parameters of the operating system.

Description

This option rounds floating-point results after floating-point operations. Rounding to user-specified precision occurs at assignments and type conversions. This has some impact on speed.

The default is to keep results of floating-point operations in higher precision. This provides better performance but less consistent floating-point results.

Alternate Options

None