Difference between revisions of "Template:Significant figures"

From Betting Wiki
Jump to navigation Jump to search
en>MSGJ
m (Changed protection level of Template:Sigfig: only 286 btransclusions, reducing protection (‎[edit=autoconfirmed] (indefinite) ‎[move=autoconfirmed] (indefinite)))
en>MSGJ
(adjust whitespace to improve code readability)
Line 1: Line 1:
<includeonly>{{#ifeq:{{{1}}}|0|0|{{Sigfig/{{#if:{{{2|}}}|rnd|sum}}|{{{1}}}|{{{2}}}|{{Order of magnitude|{{{1}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>
+
{{#ifeq:{{{1<noinclude>|0</noinclude>}}}|0
 +
|0
 +
|{{Sigfig/{{#if:{{{2|}}}
 +
  |rnd
 +
  |sum
 +
  }}
 +
  |1={{{1}}}
 +
  |2={{{2}}}
 +
  |3={{Order of magnitude|{{{1}}}}}
 +
}}
 +
}}<noinclude>
 +
{{documentation}}
 +
</noinclude>

Revision as of 17:29, 28 November 2012

{{#ifeq:0|0

|0
|{{Sigfig/{{#if:
  |rnd
  |sum
 }}
 |1={{{1}}}
 |2={{{2}}}
 |3={{safesubst:#ifexpr:{{{1}}}=0
  |{{safesubst:#ifexpr:abs{{{1}}}1=1
     |0
     |{{safesubst:#expr:floor((ln(abs{{{1}}}1)/ln10)+1)}}
   }}
  |{{#expr:floor((ln(abs({{{1}}}) )/ln 10)+1E((abs{{{1}}}>1E100 or abs{{{1}}}<1E-100)-14))}}

}}

}}

}}

50px Template documentation[create]