Misplaced Pages

Template:Round/testcases: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Template:Round Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 05:39, 18 July 2008 editMBisanz (talk | contribs)Extended confirmed users126,668 editsm Protected Template:Rnd/a: target ← Previous edit Latest revision as of 20:08, 5 September 2024 edit undoWOSlinker (talk | contribs)Administrators855,603 editsm add testcases notice 
(35 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{testcases notice}}
<includeonly>{{rnd/c{{rnd/b|abs{{{1}}}|{{{1}}}|{{{2}}}}}|{{{1}}}|{{{2}}}}}</includeonly><noinclude>This is {{tlf|rnd}}'s second step taking input from the main page with the following code.
{|class=wikitable
|-
!<code><nowiki>{{{1}}}</nowiki></code>
!<code><nowiki>{{{2}}}</nowiki></code>
!{{tl|round}}
!{{tl|round/sandbox}}
|-
|
{{round/testcases/row|0.000020004|0}}
{{round/testcases/row|0.000020004|1}}
{{round/testcases/row|0.000020004|2}}
{{round/testcases/row|0.000020004|3}}
{{round/testcases/row|0.000020004|4}}
{{round/testcases/row|0.000020004|5}}
{{round/testcases/row|0.000020004|6}}
{{round/testcases/row|0.000020004|7}}
{{round/testcases/row|0.000020004|8}}
{{round/testcases/row|0.000020004|9}}
{{round/testcases/row|0.000020004|10}}
{{round/testcases/row|0.00001|4}}
{{round/testcases/row|0.00001|5}}
{{round/testcases/row|0.00001|6}}
{{round/testcases/row|0.0001|4}}
{{round/testcases/row|0.0001|5}}
{{round/testcases/row|0.0001|6}}


{{round/testcases/row|0|0}}
*{{lt|rnd}}
{{round/testcases/row|12.3|0}}
<pre>
{{round/testcases/row|12.3|1}}
{{formatnum:{{rnd/a|{{#expr:({{{1}}})round({{{2}}})}}|{{{2}}}}}}}
{{round/testcases/row|12.3|2}}
</pre>
{{round/testcases/row|12.3|3}}

{{round/testcases/row|12.3|4}}
*{{lt|rnd/a}}
{{round/testcases/row|12.3|5}}
<pre>
{{round/testcases/row|12.3|6}}
{{rnd/c{{rnd/b|abs{{{1}}}|{{{1}}}|{{{2}}}}}|{{{1}}}|{{{2}}}}}
{{round/testcases/row|12.3|7}}
</pre>
{{round/testcases/row|12.3|8}}

{{round/testcases/row|12.3|9}}
It calls {{tlf|rnd/b}} which crunches out a code to determine which of the {{tlf|]}} subtemplates to go to next.
{{round/testcases/row|12.3|10}}

{{round/testcases/row|12.3|11}}
*{{lt|rnd/b}}
{{round/testcases/row|12.3|12}}
<pre>
{{round/testcases/row|12.3|13}}
{{#expr:2*(2+(2-({{{1}}}<10^9)*(2-({{{1}}}/10^5round0={{{1}}}/10^5)))*({{{1}}}>=10^5)-({{{1}}}<0.0001))*(({{{2}}}>0)-({{{2}}}<0))+({{{3}}}>0)}}
{{round/testcases/row|12.3|14}}
</pre>
{{round/testcases/row|12.3|15}}

{{round/testcases/row|12.3|16}}
]</noinclude>
{{round/testcases/row|12.3|17}}
{{round/testcases/row|12.12345678901234567890|0}}
{{round/testcases/row|12.12345678901234567890|1}}
{{round/testcases/row|12.12345678901234567890|2}}
{{round/testcases/row|12.12345678901234567890|3}}
{{round/testcases/row|12.12345678901234567890|4}}
{{round/testcases/row|12.12345678901234567890|5}}
{{round/testcases/row|12.12345678901234567890|6}}
{{round/testcases/row|12.12345678901234567890|7}}
{{round/testcases/row|12.12345678901234567890|8}}
{{round/testcases/row|12.12345678901234567890|9}}
{{round/testcases/row|12.12345678901234567890|10}}
{{round/testcases/row|12.12345678901234567890|11}}
{{round/testcases/row|12.12345678901234567890|12}}
{{round/testcases/row|12.12345678901234567890|13}}
{{round/testcases/row|12.12345678901234567890|14}}
{{round/testcases/row|12.12345678901234567890|15}}
{{round/testcases/row|12.12345678901234567890|16}}
{{round/testcases/row|12.12345678901234567890|17}}
{{round/testcases/row|123.12345678901234567890|10}}
{{round/testcases/row|123.12345678901234567890|11}}
{{round/testcases/row|123.12345678901234567890|12}}
{{round/testcases/row|123.12345678901234567890|13}}
{{round/testcases/row|123.12345678901234567890|14}}
{{round/testcases/row|123.12345678901234567890|15}}
{{round/testcases/row|123.12345678901234567890|16}}
{{round/testcases/row|123.12345678901234567890|17}}
{{round/testcases/row|1234.12345678901234567890|10}}
{{round/testcases/row|1234.12345678901234567890|11}}
{{round/testcases/row|1234.12345678901234567890|12}}
{{round/testcases/row|1234.12345678901234567890|13}}
{{round/testcases/row|1234.12345678901234567890|14}}
{{round/testcases/row|1234.12345678901234567890|15}}
{{round/testcases/row|1234.12345678901234567890|16}}
{{round/testcases/row|1234.12345678901234567890|17}}
{{round/testcases/row|12345.12345678901234567890|10}}
{{round/testcases/row|12345.12345678901234567890|11}}
{{round/testcases/row|12345.12345678901234567890|12}}
{{round/testcases/row|12345.12345678901234567890|13}}
{{round/testcases/row|12345.12345678901234567890|14}}
{{round/testcases/row|12345.12345678901234567890|15}}
{{round/testcases/row|12345.12345678901234567890|16}}
{{round/testcases/row|12345.12345678901234567890|17}}
{{round/testcases/row|12.3|-1}}
{{round/testcases/row|12.3|-2}}
{{round/testcases/row|12007.3|-2}}
{{round/testcases/row|12007.3|2}}
{{round/testcases/row|12+1/3|2}}
{{round/testcases/row|12+2/3|2}}
{{round/testcases/row|12+3/5|2}}
{{round/testcases/row|12+3/7|5}}
{{round/testcases/row|123000|2}}
{{round/testcases/row|12300000|-6}}
{{round/testcases/row|1.23E10|-5}}
{{round/testcases/row|8.4E10|-5}}
{{round/testcases/row|123000000|0}}
{{round/testcases/row|123400000|0}}
{{round/testcases/row|123450000|0}}
{{round/testcases/row|123456000|0}}
{{round/testcases/row|123456700|0}}
{{round/testcases/row|123456780|0}}
{{round/testcases/row|123456789|0}}
{{round/testcases/row|8.5E10|-5}}
{{round/testcases/row|1.2334E10|5}}
{{round/testcases/row|0.123|0}}
{{round/testcases/row|0.00123|2}}
{{round/testcases/row|0.0000123|7}}
{{round/testcases/row|-0.000000123|7}}
{{round/testcases/row|12.345|2}}
{{round/testcases/row|12.345|3}}
{{round/testcases/row|12.345|4}}
{{round/testcases/row|12.345|5}}
{{round/testcases/row|12345|-5}}
{{round/testcases/row|1234500|-5}}
{{round/testcases/row|1234000500|-5}}
{{round/testcases/row|12340005000|-5}}
{{round/testcases/row|123400050000|-5}}
{{round/testcases/row|1234000500000|-5}}
{{round/testcases/row|12340005000000|-5}}
{{round/testcases/row|123400050000000|-5}}
{{round/testcases/row|9000000|1}}
{{round/testcases/row|90000000|1}}
{{round/testcases/row|900000000|1}}
{{round/testcases/row|9000000000|1}}
{{round/testcases/row|100|0}}
{{round/testcases/row|1000|0}}
{{round/testcases/row|10000|0}}
{{round/testcases/row|100000|0}}
{{round/testcases/row|1000000|0}}
{{round/testcases/row|10000000|0}}
{{round/testcases/row|100000000|0}}
{{round/testcases/row|1000000000|0}}
{{round/testcases/row|10000000000|0}}
{{round/testcases/row|100|1}}
{{round/testcases/row|1000|1}}
{{round/testcases/row|10000|1}}
{{round/testcases/row|100000|1}}
{{round/testcases/row|1000000|1}}
{{round/testcases/row|10000000|1}}
{{round/testcases/row|100000000|1}}
{{round/testcases/row|1000000000|1}}
{{round/testcases/row|10000000000|1}}
{{round/testcases/row|20000000000|1}}
{{round/testcases/row|50000000000|1}}
{{round/testcases/row|70000000000|1}}
{{round/testcases/row|80000000000|1}}
{{round/testcases/row|83500000000|1}}
{{round/testcases/row|84000000000|1}}
{{round/testcases/row|84700000000|1}}
{{round/testcases/row|84800000000|1}}
{{round/testcases/row|84900000000|1}}
{{round/testcases/row|85000000000|1}}
{{round/testcases/row|85100000000|1}}
{{round/testcases/row|9000000000|-6}}
{{round/testcases/row|10000000000|-6}}
{{round/testcases/row|20000000000|-6}}
{{round/testcases/row|50000000000|-6}}
{{round/testcases/row|70000000000|-6}}
{{round/testcases/row|80000000000|-6}}
{{round/testcases/row|83500000000|-6}}
{{round/testcases/row|84000000000|-6}}
{{round/testcases/row|84700000000|-6}}
{{round/testcases/row|84800000000|-6}}
{{round/testcases/row|84900000000|-6}}
{{round/testcases/row|85000000000|-6}}
{{round/testcases/row|85100000000|-6}}
{{round/testcases/row|-123000|2}}
{{round/testcases/row|-12300000|-6}}
{{round/testcases/row|-1.23E10|-5}}
{{round/testcases/row|-8.4E10|-5}}
{{round/testcases/row|-8.5E10|-5}}
{{round/testcases/row|-1.2334E10|5}}
{{round/testcases/row|-0.123|0}}
{{round/testcases/row|-0.00123|2}}
{{round/testcases/row|-0.0000123|7}}
{{round/testcases/row|-12.345|2}}
{{round/testcases/row|-12.345|3}}
{{round/testcases/row|-12.345|4}}
{{round/testcases/row|-12.345|5}}
{{round/testcases/row|-12345|-5}}
{{round/testcases/row|-1234500|-5}}
{{round/testcases/row|123456789012|0}}
{{round/testcases/row|1234567890123|0}}
{{round/testcases/row|12345678901234|0}}
{{round/testcases/row|123456789012345|0}}
{{round/testcases/row|1234567890123456|0}}
|}

Latest revision as of 20:08, 5 September 2024

This is the template test cases page for the sandbox of Template:Round. Purge this page to update the examples.
If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page.
You can also use Special:ExpandTemplates to examine the results of template uses.
You can test how this page looks in the different skins and parsers with these links:

{{{1}}} {{{2}}} {{round}} {{round/sandbox}}
0.000020004 0 0 0
0.000020004 1 0.0 0.0
0.000020004 2 0.00 0.00
0.000020004 3 0.000 0.000
0.000020004 4 0.0000 0.0000
0.000020004 5 0 2×10
0.000020004 6 00 2.0×10
0.000020004 7 000 2.00×10
0.000020004 8 0000 2.000×10
0.000020004 9 0 2.0004×10
0.000020004 10 00 2.00040×10
0.00001 4 0.0000 0.0000
0.00001 5 0 1×10
0.00001 6 00 1.0×10
0.0001 4 0.0001 0.0001
0.0001 5 0.00010 0.00010
0.0001 6 0.000100 0.000100


0 0 0 0
12.3 0 12 12
12.3 1 12.3 12.3
12.3 2 12.30 12.30
12.3 3 12.300 12.300
12.3 4 12.3000 12.3000
12.3 5 12.30000 12.30000
12.3 6 12.300000 12.300000
12.3 7 12.3000000 12.3000000
12.3 8 12.30000000 12.30000000
12.3 9 12.300000000 12.300000000
12.3 10 12.3000000000 12.3000000000
12.3 11 12.30000000000 12.30000000000
12.3 12 12.300000000000 12.300000000000
12.3 13 12.3000000000000 12.3000000000000
12.3 14 12.30000000000000 12.30000000000000
12.3 15 12.300000000000000 12.300000000000000
12.3 16 12.3000000000000000 12.3000000000000000
12.3 17 12.30000000000000000 12.30000000000000000
12.12345678901234567890 0 12 12
12.12345678901234567890 1 12.1 12.1
12.12345678901234567890 2 12.12 12.12
12.12345678901234567890 3 12.123 12.123
12.12345678901234567890 4 12.1235 12.1235
12.12345678901234567890 5 12.12346 12.12346
12.12345678901234567890 6 12.123457 12.123457
12.12345678901234567890 7 12.1234568 12.1234568
12.12345678901234567890 8 12.12345679 12.12345679
12.12345678901234567890 9 12.123456789 12.123456789
12.12345678901234567890 10 12.1234567890 12.1234567890
12.12345678901234567890 11 12.12345678901 12.12345678901
12.12345678901234567890 12 12.123456789012 12.123456789012
12.12345678901234567890 13 12.123456789012 12.123456789012
12.12345678901234567890 14 12.123456789012 12.123456789012
12.12345678901234567890 15 12.123456789012 12.123456789012
12.12345678901234567890 16 12.123456789012 12.123456789012
12.12345678901234567890 17 12.123456789012 12.123456789012
123.12345678901234567890 10 123.1234567890 123.1234567890
123.12345678901234567890 11 123.12345678901 123.12345678901
123.12345678901234567890 12 123.12345678901 123.12345678901
123.12345678901234567890 13 123.12345678901 123.12345678901
123.12345678901234567890 14 123.12345678901 123.12345678901
123.12345678901234567890 15 123.12345678901 123.12345678901
123.12345678901234567890 16 123.12345678901 123.12345678901
123.12345678901234567890 17 123.12345678901 123.12345678901
1234.12345678901234567890 10 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 11 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 12 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 13 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 14 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 15 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 16 1,234.1234567890 1,234.1234567890
1234.12345678901234567890 17 1,234.1234567890 1,234.1234567890
12345.12345678901234567890 10 12,345.123456789 12,345.123456789
12345.12345678901234567890 11 12,345.123456789 12,345.123456789
12345.12345678901234567890 12 12,345.123456789 12,345.123456789
12345.12345678901234567890 13 12,345.123456789 12,345.123456789
12345.12345678901234567890 14 12,345.123456789 12,345.123456789
12345.12345678901234567890 15 12,345.123456789 12,345.123456789
12345.12345678901234567890 16 12,345.123456789 12,345.123456789
12345.12345678901234567890 17 12,345.123456789 12,345.123456789
12.3 -1 10 10
12.3 -2 0 0
12007.3 -2 12,000 12,000
12007.3 2 12,007.30 12,007.30
12+1/3 2 12.33 12.33
12+2/3 2 12.67 12.67
12+3/5 2 12.60 12.60
12+3/7 5 12.42857 12.42857
123000 2 123,000.00 123,000.00
12300000 -6 12,000,000 12,000,000
1.23E10 -5 1.23000×10 1.23000×10
8.4E10 -5 8.40000×10 8.40000×10
123000000 0 123,000,000 123,000,000
123400000 0 123,400,000 123,400,000
123450000 0 123,450,000 123,450,000
123456000 0 123,456,000 123,456,000
123456700 0 123,456,700 123,456,700
123456780 0 123,456,780 123,456,780
123456789 0 123,456,789 123,456,789
8.5E10 -5 8.50000×10 8.50000×10
1.2334E10 5 1.233400000000000×10 1.233400000000000×10
0.123 0 0 0
0.00123 2 0.00 0.00
0.0000123 7 0 1.23×10
-0.000000123 7 −0 −1×10
12.345 2 12.35 12.35
12.345 3 12.345 12.345
12.345 4 12.3450 12.3450
12.345 5 12.34500 12.34500
12345 -5 0 0
1234500 -5 1,200,000 1,200,000
1234000500 -5 1.2340×10 1.2340×10
12340005000 -5 1.23400×10 1.23400×10
123400050000 -5 1.234001×10 1.234001×10
1234000500000 -5 1.2340005×10 1.2340005×10
12340005000000 -5 1.23400050×10 1.23400050×10
123400050000000 -5 1.234000500×10 1.234000500×10
9000000 1 9,000,000.0 9,000,000.0
90000000 1 90,000,000.0 90,000,000.0
900000000 1 900,000,000.0 900,000,000.0
9000000000 1 9.0000000000×10 9.0000000000×10
100 0 100 100
1000 0 1,000 1,000
10000 0 10,000 10,000
100000 0 100,000 100,000
1000000 0 1,000,000 1,000,000
10000000 0 10,000,000 10,000,000
100000000 0 100,000,000 100,000,000
1000000000 0 1.000000000×10 1.000000000×10
10000000000 0 1.0000000000×10 1.0000000000×10
100 1 100.0 100.0
1000 1 1,000.0 1,000.0
10000 1 10,000.0 10,000.0
100000 1 100,000.0 100,000.0
1000000 1 1,000,000.0 1,000,000.0
10000000 1 10,000,000.0 10,000,000.0
100000000 1 100,000,000.0 100,000,000.0
1000000000 1 1.0000000000×10 1.0000000000×10
10000000000 1 1.00000000000×10 1.00000000000×10
20000000000 1 2.00000000000×10 2.00000000000×10
50000000000 1 5.00000000000×10 5.00000000000×10
70000000000 1 7.00000000000×10 7.00000000000×10
80000000000 1 8.00000000000×10 8.00000000000×10
83500000000 1 8.35000000000×10 8.35000000000×10
84000000000 1 8.40000000000×10 8.40000000000×10
84700000000 1 8.47000000000×10 8.47000000000×10
84800000000 1 8.48000000000×10 8.48000000000×10
84900000000 1 8.49000000000×10 8.49000000000×10
85000000000 1 8.50000000000×10 8.50000000000×10
85100000000 1 8.51000000000×10 8.51000000000×10
9000000000 -6 9.000×10 9.000×10
10000000000 -6 1.0000×10 1.0000×10
20000000000 -6 2.0000×10 2.0000×10
50000000000 -6 5.0000×10 5.0000×10
70000000000 -6 7.0000×10 7.0000×10
80000000000 -6 8.0000×10 8.0000×10
83500000000 -6 8.3500×10 8.3500×10
84000000000 -6 8.4000×10 8.4000×10
84700000000 -6 8.4700×10 8.4700×10
84800000000 -6 8.4800×10 8.4800×10
84900000000 -6 8.4900×10 8.4900×10
85000000000 -6 8.5000×10 8.5000×10
85100000000 -6 8.5100×10 8.5100×10
-123000 2 −123,000.00 −123,000.00
-12300000 -6 −12,000,000 −12,000,000
-1.23E10 -5 −1.23000×10 −1.23000×10
-8.4E10 -5 −8.40000×10 −8.40000×10
-8.5E10 -5 −8.50000×10 −8.50000×10
-1.2334E10 5 −1.233400000000000×10 −1.233400000000000×10
-0.123 0 0 0
-0.00123 2 0.00 0.00
-0.0000123 7 −0 −1.23×10
-12.345 2 −12.34 −12.34
-12.345 3 −12.345 −12.345
-12.345 4 −12.3450 −12.3450
-12.345 5 −12.34500 −12.34500
-12345 -5 0 0
-1234500 -5 −1,200,000 −1,200,000
123456789012 0 1.23456789012×10 1.23456789012×10
1234567890123 0 1.234567890123×10 1.234567890123×10
12345678901234 0 1.2345678901234×10 1.2345678901234×10
123456789012345 0 1.2345678901235×10 1.2345678901235×10
1234567890123456 0 1.2345678901235×10 1.2345678901235×10
Category: