Difference between revisions of "Template:ErrorBar2"

From blackwiki
Jump to navigation Jump to search
imported>Addbot
m (Bot: Migrating 6 interwiki links, now provided by Wikidata on d:q11023578)
imported>Frietjes
(make this work for negative numbers)
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}|{{#ifexpr: {{{2}}} > {{{1}}} * {{{3}}}|approx. {{rnd|{{{1}}}|-{{order of magnitude|{{{2}}}}}}}|{{rnd|{{{1}}}|-{{order of magnitude|{{{2}}}}} }} ± {{rnd|{{{2}}}|-{{order of magnitude|{{{2}}}}} }} }} |{{{1}}} }}</includeonly><noinclude>
+
<includeonly>{{#if:{{{2|}}}|{{#ifexpr: abs({{{2}}}) > abs({{{1}}} * {{{3}}})|approx. {{rnd|{{{1}}}|-{{order of magnitude|{{{2}}}}}}}|{{rnd|{{{1}}}|-{{order of magnitude|{{{2}}}}} }} ± {{rnd|{{{2}}}|-{{order of magnitude|{{{2}}}}} }} }} |{{{1}}} }}</includeonly><noinclude>
  
 
This template is used to display a correctly rounded uncertain quantity and its uncertainty, except that if
 
This template is used to display a correctly rounded uncertain quantity and its uncertainty, except that if

Revision as of 19:07, 16 October 2015


This template is used to display a correctly rounded uncertain quantity and its uncertainty, except that if the uncertainty exceeds a threshold times the quantity, the uncertainty is not displayed and it is merely indicated that the quantity is uncertain.

Its syntax is

{{ErrorBar2|uncertain-quantity|uncertainty|threshold}}.

For example: