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

ID 767251
Date 3/31/2023
Public

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

Document Table of Contents

prec-div, Qprec-div

Improves precision of floating-point divides. This feature is only available for ifort.

Syntax

Linux:

-prec-div

-no-prec-div

macOS:

-prec-div

-no-prec-div

Windows:

/Qprec-div

/Qprec-div-

Arguments

None

Default

OFF

Default heuristics are used. The default is not as accurate as full IEEE division, but it is slightly more accurate than would be obtained when /Qprec-div- or -no-prec-div is specified.

If you need full IEEE precision for division, you should specify [Q]prec-div.

Description

This option improves precision of floating-point divides. It has a slight impact on speed.

At default optimization levels, the compiler may change floating-point division computations into multiplication by the reciprocal of the denominator. For example, A/B is computed as A * (1/B) to improve the speed of the computation. Also, vectorization at default optimization levels may cause the use of multiplication by the reciprocal of the denominator in some iterations, and floating-point division in other iterations.

However, sometimes the value produced by this transformation is not as accurate as full IEEE division. When it is important to have fully precise IEEE division, use this option to disable the floating-point division-to-multiplication optimization. The result is more accurate, with some loss of performance.

If you specify -no-prec-div (Linux* and macOS) or /Qprec-div- (Windows*), it enables optimizations that give slightly less precise results than full IEEE division.

Option [Q]prec-div is implied by option -fp-model precise (Linux* and macOS) and option /fp:precise (Windows*).

IDE Equivalent

None

Alternate Options

None

See Also