Sjabloon:Rndgaps/doc
Naar navigatie springen
Naar zoeken springen
40px | This is a documentation subpage for Sjabloon:Rndgaps. It contains usage information, categories, interlanguage links and other content that is not part of the original sjabloon page. |
Usage
Like {{rnd}}, this template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives) and includes trailing zeros. Also like {{rnd}}, scientific notation is used for numbers whose absolute value is greater than or equal to 1×109, or less than 1×10−4. It differs from {{rnd}} in that it uses thin gaps to delimit numbers like {{val}} (see also {{gaps}}).
Examples:
{{rndgaps|2.0004|3}}
→ 2.000{{rndgaps|0.000020004|7}}
→ 2.Fout in uitdrukking: Onbekend leesteken "[".×10−5{{rndgaps|0|8}}
→ 0.Fout in uitdrukking: Onbekend leesteken "[".{{rndgaps|154268|-3}}
→ 154000{{rndgaps|1200004|-1}}
→ 1200000{{rndgaps|1300004|-1}}
→ 1300000{{rndgaps|4.1e6|9}}
→ 4099999.999Fout in uitdrukking: Onbekend leesteken "[".{{rndgaps|4.1e6|10}}
→ 4099999.999Fout in uitdrukking: Onbekend leesteken "[".{{rndgaps|1542689271|-7}}
→ 1.Fout in uitdrukking: Onbekend leesteken "[".×109{{rndgaps|1542689271|2}}
→ 1.Fout in uitdrukking: Onbekend leesteken "[".×109{{rndgaps|7e9|-9}}
→ 7×109{{rndgaps|-123|1}}
→ −123.0{{rndgaps|-1200007|-2}}
→ −1200000{{rndgaps|-1234567899|-7}}
→ −1.Fout in uitdrukking: Onbekend leesteken "[".×109
As with #expr, the total number of significant digits is not more than 14:
{{rndgaps|1234567890.123456789|10}}
→ 1.Fout in uitdrukking: Onbekend leesteken "[".×109{{rndgaps|123456789.0123456789|10}}
→ 123456789.012Fout in uitdrukking: Onbekend leesteken "[".{{rndgaps|.0001234567890123456789|20}}
→ 0.000Fout in uitdrukking: Onbekend leesteken "[".
Internal details
The template uses the following.
- {{val/delimitnum/fraction}} — for trailing zeros
- {{rndgaps/e+}} — for scientific notation for numbers greater than or equal to 109 or less than or equal to −109
- {{rndgaps/e−}} — for scientific notation for numbers greater than −10−4 and less than 10−4 but not equal to zero
See also