Technical data

Cray Standard C/C++ Reference Manual
realized. For example, this option is useful in loops that contain divides with a
loop-invariant divisor or sequences of divides with the same divisor. If the
option is enabled, you could see slight numerical differences from compiles
for which the option is not enabled. You could also see numerical differences
between instances of the same computation for the same compile, depending
on the context of the computation.
This option is affected by the scalar optimization level (see Section 2.8.1, page 16).
The -h ieeeconform option overrides the -h fastfpdivide option.
2.15.6 -h [no]rounddiv (CC, cc)
Default option: -h norounddiv
Floating-point: Cray floating-point
The -h [no]rounddiv option enables or disables strong rounding of all
floating-point divide operations to allow the compiler to produce more
symmetric results. Strong rounding ensures that all floating-point divide
operations whose exact result is an integer will have an absolute value slightly
greater than the integer value. This ensures that if these floating-point values are
converted back into integer values they will represent the expected results. For
example, results such as 2.99999..., when converted, will be treated as 3.
2.15.7 -h [no]trunc[=n] (CC, cc)
Default option: -h notrunc
Floating-point: Cray floating-point
The -h trunc[=n] option specifies truncation of the last n bits (range of n:0n
47) of single-precision floating-point arithmetic. This option has no effect on
double precision operations, function return values, and compile-time constants.
This option is useful for identifying numerically unstable algorithms. -h trunc
with no argument is equivalent to -h trunc=0; that is, the assembler truncation
instructions for floating-point arithmetic are generated, and the results from
floating operations are truncated by 0 bits. The -h notrunc option generates
assembler rounding instructions for floating arithmetic.
2.16 Analysis Tool Options
The following sections describe compiler options that support analysis tools.
28 S217936