In this topic, we described about the ROUNDED Phrase with detailed example.
ROUNDED option used to round the fraction result of the compute statement exceeds the length of the target data item fractional places.
After decimal point alignment, the number of fraction places in arithmetic operation is compared with the number of fraction places of result identifier.
If the size of fractional result exceeds the number of factional digits declared in resultant identifier, truncation occurs and the excess fractional digits ignored.
If the ROUNDED option specified, the least significant digit of the resultant identifier is increased by 1 if the next fraction value greater than 5.
In a floating-point arithmetic operation, the result of a floating-point operation is always rounded and the ROUNDED phrase has no effect.