Suffixation of decimal numbers: Difference between revisions

Line 1,052:
{{works with|cpython|3.7.3}}
Tested in Python 3.7.3<br />
Chose 3 places after decimal (where applicable) as default rounding precision. Number to suffize taken as a string. There are some edge cases where this fails due to binary arithmetic differing from decimal arithmetic and things not rounding nicely.
<lang python>
import math