fix floating point calculation

Python's built-in round() method has calculation error
for floating point calculation as follows.

e.g.
round(0.1205, 3) -> 0.120 (expected 0.121)
round(1.99995, 4) -> 1.9999 (expected 2.0000)

It's not a bug but a specification of python
to use approximation by binary for floating point
calculation. It also appears when using string
formating such as '%7.3f'.

Unfortunately, it causes assertion error within unittests.

This patch adds _round() method which behaves almost like
round() method. In addition to it, _round() supports rigorous
floating calculation by decimal and fixes the assertion error.