The following general rules apply to all arithmetic operations on the DECFLOAT data type.
If the coefficient of the theoretical exact result has no more than the number of digits that reflect its precision (16 or 34), then (unless there is an underflow or overflow) it is used for the result without change. Otherwise, it is rounded (shortened) to exactly the number of digits that reflect its precision (16 or 34) and the exponent is increased by the number of digits removed.
Rounding uses the DECFLOAT rounding mode. For more information, see CURRENT DECFLOAT ROUNDING MODE.
If the value of the adjusted
exponent of the result is less than Emin, then a
subnormal
warning is returned.1 In this case, the
calculated coefficient and exponent form the result, unless the value
of the exponent is less than Etiny, in which case the exponent
will be set to Etiny, the coefficient is rounded (possibly
to zero) to match the adjustment of the exponent, and the sign is
unchanged. If this rounding gives an inexact result then an underflow
warning is returned. 1
If
the value of the adjusted exponent of the result is larger than Emax then
an overflow
warning
is returned. In this case,
the result may be infinite. It will have the same sign as the theoretical
result.
The following arithmetic operations
return a warning and result in NaN:1

warning or error
when used as
an operand of an arithmetic operation.
In some instances, negative zero might be the
result from arithmetic operations and numeric functions.

INFINITY + 1 = INFINITY INFINITY + INFINITY = INFINITY INFINITY + -INFINITY = NAN -- warning NAN + 1 = NAN NAN + INFINITY = NAN 1 - INFINITY = -INFINITY INFINITY - INFINITY = NAN -- warning -INFINITY - -INFINITY = NAN -- warning -0.0 - 0.0E1 = -0.0 -1.0 * 0.0E1 = -0.0 1.0E1 / 0 = INFINITY -1.0E5 / 0.0 = -INFINITY 1.0E5 / -0 = -INFINITY INFINITY / -INFINITY = NAN -- warning INFINITY / 0 = INFINITY -- warning -INFINITY / 0 = -INFINITY -- warning -INFINITY / -0 = INFINITY -- warning