mp

Maintains floating-point precision while disabling some optimizations.

IDE Equivalent

Windows: None

Linux: Floating Point > Improve Floating-point Consistency

Mac OS: Floating Point > Improve Floating-point Consistency

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux and Mac OS: -mp
Windows:  None

Arguments

None

Default

OFF The compiler provides good accuracy and run-time performance at the expense of less consistent floating-point results.

Description

This option maintains floating-point precision while disabling some optimizations.It restricts optimization to maintain declared precision and to ensure that floating-point arithmetic conforms more closely to the ANSI* language and IEEE* arithmetic standards.

For most programs, specifying this option adversely affects performance. If you are not sure whether your application needs this option, try compiling and running your program both with and without it to evaluate the effects on both performance and precision.

The recommended method to control the semantics of floating-point calculations is to use option -fp-model.

Alternate Options

Linux and Mac OS: -mieee-fp
Windows: None

See Also

mp1, Qprec compiler option

fp-model, fp compiler option