Category:Subtemplates of Template Rnd
From Wikinfo
The following is a list of the subtemplates of {{rnd}}. This list excludes the main template and its documentation page.
Contents |
Code
{{formatnum:{{rnd/a|{{#expr:({{{1}}})round({{{2}}})}}|{{{2}}}}}}}
A
{{rnd/c{{rnd/b|abs{{{1}}}|{{{1}}}|{{{2}}}}}|{{{1}}}|{{{2}}}}}
It calls {{rnd/b}} which crunches out a code to determine which of the {{rnd/c*}} subtemplates to go to next.
B
{{#ifexpr:{{{2}}}=0|0|{{#ifexpr:{{{2}}}<0|-}}{{#ifexpr:{{{1}}}<10^5|{{#ifexpr:{{{1}}}<0.0001|2|4}}|{{#ifexpr:{{{1}}}<10^9|{{#ifexpr:{{{1}}}/10^5round0={{{1}}}/10^5|6|4}}|8}}}}}}dec{{#expr:{{{3}}}>0}}
C
The {{rnd/c*}} subtemplates can be divided into four groups. There are the "dec0"s and "dec1"s and the positives and negatives. Negatives give a negative output. "dec1"s will give an output precision greater than zero.
They can also be divided into five groups. Take take the absolute value of the number after the c halve it. Call the result the "group number".
- Group 0
- gives zero
- Group 1
- gives scientific notation with a negative exponent
- Group 2
- gives regular numerical notation with a precision greater than −5
- Group 3
- gives regular numerical notation with a precision less than or equal to −5
- Group 4
- gives scientific notation with a positive exponent
| This page uses content from Wikipedia. The original article was at Category:Subtemplates of Template Rnd. The list of authors can be seen in the page history. The text of this Wikinfo article is available under the GNU Free Documentation License and the Creative Commons Attribution-Share Alike 3.0 license. |
Pages in category "Subtemplates of Template Rnd"
The following 6 pages are in this category, out of 6 total.

