Reworked decimal rounding method (fixes #1924).

Reworked decimal rounding method (fixes #1924).