fpe

Allows some control over floating-point exception handling for the main program at run-time.

IDE Equivalent

Windows: Floating-Point > Floating-Point Exception Handling
Linux: None
Mac OS: None

Architectures

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

Syntax

Linux and Mac OS: -fpen
Windows:  /fpe:n

Arguments

n Specifies the floating-point exception handling. Possible values are:
  0 Floating-point invalid, divide-by-zero, and overflow exceptions are enabled. If any such exceptions occur, execution is aborted. This option sets the -ftz (Linux and Mac OS) or /Qftz (Windows) option; therefore underflow results will be set to zero unless you explicitly specify -no-ftz (Linux and Mac OS) or /Qftz- (Windows).
On ItaniumŪ-based systems, underflow behavior is equivalent to specifying option -ftz or /Qftz.
On IA-32 or IntelŪ EM64T systems, underflow results from SSE instructions, as well as x87 instructions, will be set to zero. By contrast, option -ftz or /Qftz only sets SSE underflow results to zero.
To get more detailed location information about where the error occurred, use option traceback.
  1 All floating-point exceptions are disabled. This option sets the -ftz  or /Qftz option; therefore underflow results will be set to zero unless you explicitly specify -no-ftz or /Qftz-.
  3 All floating-point exceptions are disabled. Floating-point underflow is gradual, unless you explicitly specify a compiler option that enables flush-to-zero, such as -ftz or /Qftz, O3, or O2 on IA-32 and Intel EM64T systems. This setting provides full IEEE support.

Default

-fpe3 or /fpe:3 All floating-point exceptions are disabled. Floating-point underflow is gradual, unless you explicitly specify a compiler option that enables flush-to-zero.

Description

This option allows some control over floating-point exception handling for the main program at run-time. This includes whether exceptional floating-point values are allowed and how precisely run-time exceptions are reported.

The fpe option affects how the following conditions are handled:

When enabled exceptions occur, execution is aborted and the cause of the abort reported to the user. If compiler option traceback is specified at compile time, detailed information about the location of the abort is also reported.

This option does not enable underflow exceptions, input denormal exceptions, or inexact exceptions.

Alternate Options

None

See Also

ftz, Qftz compiler option

traceback compiler option

Building Applications: Using the Floating-Point Exception Handling (-fpe) Option
Optimizing Applications: Understanding Floating-point Performance