-y
Category
Pragma equivalent
None.
Purpose
Specifies the rounding mode for the compiler to use when evaluating constant floating-point expressions at compile time.
Defaults
- -yn
Parameters
The
following suboptions are valid for binary floating-point types only:
- m
- Round toward minus infinity.
- n
- Round to the nearest representable number, ties to even.
- p
- Round toward plus infinity.
- z
- Round toward zero.
Usage
If your program contains operations involving long doubles, the rounding mode must be set to -yn (round-to-nearest representable number, ties to even).
Predefined macros
None.
Examples
To compile myprogram.c so
that constant floating-point expressions are rounded toward zero at
compile time, enter:
xlc myprogram.c -yz