Difference between revisions of "Template:Number table sorting"

From blackwiki
Jump to navigation Jump to search
test>Jimp
(a completely new approach which vastly increases the range by creating a hidden code based on the order of magnitude, see talk)
test>Jimp
(Undid revision 514735966 by Jimp (talk))
Line 1: Line 1:
{{number table sorting/{{#iferror:{{#expr:+{{formatnum:{{{1|}}}|R}}}}
+
{{#if:{{{1|}}}
      |error
+
|<span style="{{#ifeq:{{{debug|}}}|yes
      |Q{{{quiet|no/F{{{format|yes}}}/S{{{scinote|no}}}}}}/{{#expr:{{formatnum:{{{1}}}|R}}<0}}
+
  |border:1px solid
    }}
+
  |display:none
   |{{formatnum:{{{1|}}}|R}}
+
}}">{{Number table sorting/{{#ifexpr:{{formatnum:{{{1}}}|R}}<0
  |{{#expr:floor((ln(abs({{formatnum:{{{1}}}|R}}))/ln10)+1E-14)}}
+
  |negative
  |style={{#ifeq:{{{debug}}}|yes
+
   |positive
      |border:1px solid
+
  }}
      |display:none
+
  |1={{#expr:abs {{formatnum:{{{1}}}|R}}}}
    }}
+
}}</span>{{{prefix|}}}{{#ifeq:{{{quiet|}}}|yes
   |prefix={{{prefix|}}}
+
  |<!--Null-->
 +
  |{{#ifeq:{{{format}}}|no
 +
  |{{{1}}}
 +
   |{{formatnum:{{{1}}}}}
 +
  }}
 +
}}
 
}}<noinclude>
 
}}<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 04:54, 27 September 2012

Template documentation[create]