Difference between revisions of "Template:ErrorBar2"
Jump to navigation
Jump to search
Template documentation
imported>Addbot m (Bot: Migrating 6 interwiki links, now provided by Wikidata on d:q11023578) |
imported>Funandtrvl (refine category) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| 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> |
| − | + | {{documentation|content= | |
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 | ||
the uncertainty exceeds a threshold times the quantity, the uncertainty is not displayed and it is merely | the uncertainty exceeds a threshold times the quantity, the uncertainty is not displayed and it is merely | ||
| Line 7: | Line 7: | ||
Its syntax is | Its syntax is | ||
| − | <nowiki>{{ErrorBar2|</nowiki>''uncertain-quantity'' | + | <nowiki>{{ErrorBar2|</nowiki>''uncertain-quantity''{{!}}''uncertainty''{{!}}''threshold''<nowiki>}}</nowiki>. |
For example: | For example: | ||
| Line 17: | Line 17: | ||
* <nowiki>{{ErrorBar2|1573.614|0.007|0.1}}</nowiki> yields ''{{ErrorBar2|1573.614|0.007|0.1}}''. | * <nowiki>{{ErrorBar2|1573.614|0.007|0.1}}</nowiki> yields ''{{ErrorBar2|1573.614|0.007|0.1}}''. | ||
| − | </noinclude> | + | [[Category:Astronomy templates]] |
| + | [[Category:Mathematical function templates]] | ||
| + | }}</noinclude> | ||
Latest revision as of 20:19, 29 July 2020
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:
- {{ErrorBar2|1573.614|687.9|0.1}} yields approx. Template:Rnd.
- {{ErrorBar2|1573.614|187.9|0.1}} yields approx. Template:Rnd.
- {{ErrorBar2|1573.614|123.4|0.1}} yields Template:Rnd ± Template:Rnd.
- {{ErrorBar2|1573.614|47.9|0.1}} yields Template:Rnd ± Template:Rnd.
- {{ErrorBar2|1573.614|0.873|0.1}} yields Template:Rnd ± Template:Rnd.
- {{ErrorBar2|1573.614|0.007|0.1}} yields Template:Rnd ± Template:Rnd.
| Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Subpages of this template. |