Use R3's rounding implementation instead of round(3).

This should ensure greater portability as `round(3)` was standardised as
part of C99.