Lahey/GNU Fortran

-[n]ap

Arithmetic Precision

Compile only. Default: -nap

GFortran option: -ffloat-store

Specify -ap to guarantee the consistency of REAL and COMPLEX calculations, regardless of optimization level; user variables are not assigned to registers. Consider the following example:

Example

X = S - T 2 Y = X - U ... 3 Y = X - U

By default (-nap), during compilation of statement 2, the compiler recognizes the value X is already in a register and does not cause the value to be reloaded from memory. At statement 3, the value X may or may not already be in a register, and so the value may or may not be reloaded accordingly. Because the precision of the datum is greater in a register than in mem-ory, a difference in precision at statements 2 and 3 may occur.

Specify -ap to choose the memory reference for non INTEGER operands; that is, registers are reloaded. -ap must be specified when testing for the equality of randomly-generated values.

The default, -nap, allows the compiler to take advantage of the current values in registers, with possibly greater accuracy in low-order bits.

Specifying -ap will usually generate slower executables.