Template:Convert/round

From RouteWiki
< Template:Convert
Revision as of 13:32, 11 October 2010 by Rich Farmbrough (talk) (update template name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{{#ifexpr:{{{2}}}=0|0|{{rnd/b{{#expr:( ({{{2}}})round(({{#ifexpr:{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}<{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}}})) >0 )-( ({{{2}}})round(({{#ifexpr:{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}<{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}}})) <0 )}}|{{#expr: ({{{2}}})round(({{#ifexpr:{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}<{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}}})) }}|({{#ifexpr:{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}<{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}}})|{{#expr:({{#ifexpr:{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}<{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:1-{{#ifexpr:{{{2}}}=0

|0
|{{#expr:{{#expr:floor(ln(abs({{{2}}}))/ln10)}}+( ( {{{2}}} )/10^{{#expr:floor(ln(abs({{{2}}}))/ln10)}}>=10)}}

}}}}|{{#expr:({{#if:{{#titleparts:1{{{1}}}|1|2}}|{{#expr:(ln{{#titleparts:1{{{1}}}|1|2}})/ln10}}|{{#expr:{{precision/{{#expr:3*1{{{1}}}>1{{{1}}}0}}|1{{{1}}}}}}}}}+{{{5}}}-0.5+(ln2/ln10))round0}}}})>0}} }}}}Template:Pp-template