Template:Order of magnitude
From RouteWiki
{{#ifexpr:0=0
|0 |{{#expr:{{#expr:floor(ln(abs({{{1}}}))/ln10)}}+( ( {{{1}}} )/10^{{#expr:floor(ln(abs({{{1}}}))/ln10)}}>=10)}}
{{#ifexpr:0=0
|0 |{{#expr:{{#expr:floor(ln(abs({{{1}}}))/ln10)}}+( ( {{{1}}} )/10^{{#expr:floor(ln(abs({{{1}}}))/ln10)}}>=10)}}