Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Floating-Point Environment

The floating-point environment is a collection of registers that control the behavior of the floating-point machine instructions and indicate the current floating-point status. The floating-point environment can include rounding mode controls, exception masks, flush-to-zero (FTZ) controls, exception status flags, and other floating-point related features.

The floating-point environment affects most floating-point operations; therefore, correct configuration to meet your specific needs is important. For example, the exception mask bits define which exceptional conditions will be raised as exceptions by the processor. In general, the default floating-point environment is set by the operating system. You don't need to configure the floating-point environment unless the default floating-point environment does not suit your needs.

There are several methods available to modify the default floating-point environment:

  • inline assembly
  • compiler built-in functions
  • library functions
  • command line options
  • intrinsic procedures defined in the IEEE intrinsic modules

By default the floating-point environment access is set to off. To enable floating-point environment access, set -fp-model=strict.

Changing the default floating-point environment affects runtime results only. This does not affect any calculations that are pre-computed at compile time.