Sets the IEEE rounding mode in effect at startup.
This option sets the IEEE 754 rounding mode that:
Can be used by the compiler in evaluating constant expressions
Is established at runtime during the program initialization
The meanings are the same as those for the ieee_flags subroutine, which can be used to change the mode at runtime.
r must be one of the following values.
Table A–12 The -fround Values
Value |
Meaning |
---|---|
nearest |
Rounds towards the nearest number and breaks ties to even numbers. |
tozero |
Rounds to zero. |
negative |
Rounds to negative infinity. |
positive |
Rounds to positive infinity. |
When the –fround option is not specified, the rounding mode defaults to -fround=nearest.
If you compile one routine with –fround=r, compile all routines of the program with the same –fround=r option; otherwise, you might get unexpected results.
This option is effective only if used when compiling the main program.