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

ID 767251
Date 6/24/2024
Public
Document Table of Contents

ffp-accuracy, Qfp-accuracy

Lets you specify the required accuracy (precision) for floating-point operations and library calls. This feature is only available for ifx.

Syntax

Linux:

-ffp-accuracy=value

Windows:

/Qfp-accuracy:value

Arguments

value

Is the accuracy that the compiler should use. Possible values are:

high

Sets a maximum error of 1 ulp.

medium

Sets a maximum error of 4 ulp.

low

Sets a maximum error to 11-bits of accuracy for single-precision routines (~8192 ulp) and 26-bits of accuracy for double-precision routines.

sycl

Determined by the OpenCL specification for math function accuracy: https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#relative-error-as-ulps.

cuda

Determined by the CUDA standard: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#mathematical-functions-appendix.

Default

OFF

If option ffp-accuracy or Qfp-accuracy is not specified:

  • On the host, the accuracy for floating-point operations and library calls is determined by the setting of option -fp-model (Linux*) and option /fp (Windows*).

  • On offload devices, the default accuracy is device-dependent.

Description

This option lets you specify the required accuracy (precision) for floating-point operations and library calls.

The accuracy requirements are applied to host code and, if used, to OpenMP and SYCL device code. The option is only supported for CPU Ahead of Time (AOT) compilation with SYCL and OpenMP.

CAUTION:

This option is not compatible with the fimf-* and Qimf-* options. If this option is used with any of those options, an error will be reported.

IDE Equivalent

None

Alternate Options

None

See Also