ILE C/C++ Compiler Reference
Specifies the compile-time rounding mode for the evaluation
of constant decimal floating-point expressions. This option
does not affect the run-time decimal floating-point
rounding mode, which is set using the setca built-in function.

DECFLTRND Syntax:
|--+------------------------------+-----------------------------|
| .-*HALFEVEN-. |
'-DECFLTRND(--+-*DOWN-----+--)-'
+-*UP-------+
+-*HALFUP---+
+-*HALFDOWN-+
+-*FLOOR----+
'-*CEILING--'
The possible options are:
- *HALFEVEN
- Default setting. Round to the nearest value. In a tie, choose
even. For example, 5.22 rounds to 5.2, 5.67 rounds to 5.7, 5.55 rounds
to 5.6, 5.65 rounds to 5.6.
- *DOWN
- Round toward zero, or truncate the result. For example, 5.22
rounds to 5.2, 5.67 rounds to 5.6, 5.55 rounds to 5.5, 5.65 rounds
to 5.6
- *UP
- Round away from zero. For example, 5.22 rounds to 5.3, 5.67
rounds to 5.7, 5.55 rounds to 5.6, 5.65 rounds to 5.7.
- *HALFUP
- Round to the nearest value. In a tie, round away from zero.
For example, 5.22 rounds to 5.2, 5.67 rounds to 5.7, 5.55 rounds to
5.6, 5.65 rounds to 5.7.
- *HALFDOWN
- Round to the nearest value. In a tie, round toward zero. For
example, 5.22 rounds to 5.2, 5.67 rounds to 5.7, 5.55 rounds to 5.5,
5.65 rounds to 5.6.
- *FLOOR
- Round toward negative affinity. For example, 5.22 rounds to
5.2, 5.67 rounds to 5.6, 5.55 rounds to 5.5, 5.65 rounds to 5.6
- *CEILING
- Round toward positive infinity. For example, 5.22 rounds to
5.3, 5.67 rounds to 5.7, 5.55 rounds to 5.6, 5.65 rounds to 5.7.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]