Шаблон:Convert/Dual/rnd
Usage
The Template:Convert/Dual/rnd rounds the amounts in a range of units, to set the default precision to match the highest of the two amounts, or increase the precision by 1 level if the two numbers are close in value. Examples:
A rounding parameter, such as "|2" will override the default precision and show 2 decimal digits. However, the default precision is auto-adjusted so that both amounts are treated as being similar in precision; otherwise a whole multiple of hundreds, such as "800" would have precision -1 while "800.06" would have precision 2, and the range "800–800.06" could be skewed as if spanning 10.06 units, rather than 0.06 units as would seem more logical. The auto-adjustment of precision treats both amounts as having the precision of the more-precise amount, but also increased by 1 level if the numbers are close in value.