Difference between revisions of "Template:Number table sorting"

From blackwiki
Jump to navigation Jump to search
test>Plastikspork
(Blank if first parameter is missing)
test>Patrick
(use floor; position too large numbers at the high end)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|<span style="{{#ifeq:{{{debug|}}}|yes|border:1px solid|display:none}}">&{{#expr:(({{{1}}}/1e15-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e14-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e13-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e12-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e11-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e10-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e9-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e8-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e7-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e6-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e5-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e4-.5) round 0) mod 10}}{{#expr:(({{{1}}}/1e3-.5) round 0) mod 10}}{{#expr:(({{{1}}}/100-.5) round 0) mod 10}}{{#expr:(({{{1}}}/10-.5) round 0) mod 10}}{{#expr:(({{{1}}}-.5) round 0) mod 10}}.{{padleft:{{#expr:(1000000*({{{1}}}- ({{#ifexpr:({{{1}}}-0.5)=-0.5|0|{{#expr:({{{1}}}-0.5) round 0}}}}))) round 0}}|6|0}}</span>{{formatnum:{{{1}}}}}}}</includeonly><noinclude>
+
<includeonly>{{#if:{{{1|}}}|<span style="{{#ifeq:{{{debug|}}}|yes|border:1px solid|display:none}}">&{{#ifexpr:{{{1}}}>=1e16|~|{{#expr:floor({{{1}}}/1e15)}}{{#expr:floor({{{1}}}/1e14) mod 10}}{{#expr:floor({{{1}}}/1e13) mod 10}}{{#expr:floor({{{1}}}/1e12) mod 10}}{{#expr:floor({{{1}}}/1e11) mod 10}}{{#expr:floor({{{1}}}/1e10) mod 10}}{{#expr:floor({{{1}}}/1e9) mod 10}}{{#expr:floor({{{1}}}/1e8) mod 10}}{{#expr:floor({{{1}}}/1e7) mod 10}}{{#expr:floor({{{1}}}/1e6) mod 10}}{{#expr:floor({{{1}}}/1e5) mod 10}}{{#expr:floor({{{1}}}/1e4) mod 10}}{{#expr:floor({{{1}}}/1e3) mod 10}}{{#expr:floor({{{1}}}/100) mod 10}}{{#expr:floor({{{1}}}/10) mod 10}}{{#expr:floor{{{1}}} mod 10}}{{padleft:{{#expr:floor(1e6*({{{1}}}-floor{{{1}}}))}}|6|0}}}}</span>{{formatnum:{{{1}}}}}}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!-- Add cats and interwikis to the /doc subpage, not here! -->
 
<!-- Add cats and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Revision as of 09:02, 5 September 2010

Template documentation[create]