Difference between revisions of "Template:Convert/round"

From RouteWiki
Jump to: navigation, search
m (update template name)
 
m (1 revision)
 
(No difference)

Latest revision as of 21:04, 23 March 2011

{{#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