Template:Number table sorting/doc

From TrainzOnline
< Template:Number table sorting(Difference between revisions)
Jump to: navigation, search
(port unchanged from Meta-wiki+cat w/{{Metawiki})
(try fix may be nesting in caller)
 
Line 121: Line 121:
 
==See also==
 
==See also==
 
* [[w:Template:Nts]]
 
* [[w:Template:Nts]]
{{Meta-wiki}}
+
<noinclude>{{Meta-wiki}}</noinclude><includeonly>
<includeonly>
+
 
[[Category:Sorting templates|Nts]]
 
[[Category:Sorting templates|Nts]]
 +
{{Meta-wiki}}
 
</includeonly>
 
</includeonly>

Latest revision as of 09:22, 6 July 2013



 
It contains usage information, categories and other informational content that is best arranged so that it is not part of the original template page, such as in many cases, examples of how to use the template in question.
  • Documentation subpages were developed to reduce server demands, or to protect the code version of widely used templates.
     

Nts stands for Number Table Sorting and is used to display numbers with thousands separator in a sortable table and have them numerically sorted in alphabetic sort mode. It is applied to all numbers of a column, in cases where numeric sort mode does not work or is not desired.

The supplied input numbers should not have thousands separators. Apart from the added thousands separators the numbers are formatted like supplied (scientific notation or not, leading and trailing zeros, and a zero before the decimal point or not). This formatting does not affect the sorting order except for numbers not satisfying the limitations mentioned below.

Contents

[edit] Purpose

If some table cells in a column contain text after the number, or if the numbers are preceded by some fixed text other than a currency symbol, alphabetic sorting mode is needed.

Also, formerly, for table sorting to function correctly, numbers had to be entered with not more than one thousands separator. As a workaround alphabetic sorting mode was applied, and the numbers provided with a hidden part so that alphabetic sorting corresponded with numeric sorting. Since a mix in one column of numbers formatted for alphabetic sorting and plain numbers does not allow proper sorting, adding a number in an existing table may require putting it in the format used in that column.

[edit] Method

This template automatically creates hidden code like <span style="display:none">&0000000123456789.001230</span> before the actual displayed number. The preceding ampersand forces the sorting routine to use text sort. The routine sorts the total text without the tags, which corresponds to numeric sorting due to the leading zeros.

[edit] Limitations

  • Negative numbers do not sort correctly with this template: while they correctly come at the low end, mutually they are sorted in reverse order (i.e., in the order of the absolute value).
  • The maximum number is 1{{#if:16
|×10{{#switch:{{{2}}}
 |#default={{#switch:{{#if:16|{{#ifeq:16|{{#if:{{#ifexpr:{{#expr:16}}}}|(16)|{{#expr:16}}}}|true|{{#ifeq:16|+{{#if:{{#ifexpr:{{#expr:16}}}}|(16)|{{#expr:16}}}}|true|{{#ifeq:16|({{#if:{{#ifexpr:{{#expr:16}}}}|(16)|{{#expr:16}}}})|true|false}}}}}}}}
  |#default={{#switch:{{{2}}}
   |plus=+{{#ifexpr:(161)=(16)|Template:FormattingError|{{#ifexpr:16<0|−}}{{#ifexpr:abs(161)>10*abs(16)|{{#expr:abs(16)}}|{{#expr:trunc(abs(16))}}.{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>14|Template:FormattingError|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=1|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E1mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=2|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E2mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=3|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E3mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=4|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>4|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E4mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=5|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E5mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=6|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E6mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=7|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>7|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E7mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=8|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E8mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=9|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E9mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=10|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>10|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E10mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=11|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E11mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=12|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E12mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=13|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>13|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E13mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=14|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E14mod10}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
   |#default={{#ifexpr:(161)=(16)|Template:FormattingError|{{#ifexpr:16<0|−}}{{#ifexpr:abs(161)>10*abs(16)|{{#expr:abs(16)}}|{{#expr:trunc(abs(16))}}.{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>14|Template:FormattingError|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=1|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E1mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=2|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E2mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=3|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E3mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=4|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>4|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E4mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=5|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E5mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=6|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E6mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=7|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>7|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E7mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=8|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E8mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=9|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E9mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=10|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>10|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E10mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=11|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E11mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=12|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E12mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=13|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>13|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E13mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=14|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E14mod10}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
  }}
  |false=16
 }}
 |text=16
}}
|e

}}. While larger numbers correctly come at the high end, they are mutually sorted alphabetically.

  • There is a maximum of 6 digits after the decimal separator. When using a consistent non-scientific notation numbers with more than 6 digits after the decimal separator still sort correctly. They sort correctly with respect to 0 if they are written with the zero before the decimal point.
  • In the case of text before a number, the entry is positioned like 1{{#if:16
|×10{{#switch:{{{2}}}
 |#default={{#switch:{{#if:16|{{#ifeq:16|{{#if:{{#ifexpr:{{#expr:16}}}}|(16)|{{#expr:16}}}}|true|{{#ifeq:16|+{{#if:{{#ifexpr:{{#expr:16}}}}|(16)|{{#expr:16}}}}|true|{{#ifeq:16|({{#if:{{#ifexpr:{{#expr:16}}}}|(16)|{{#expr:16}}}})|true|false}}}}}}}}
  |#default={{#switch:{{{2}}}
   |plus=+{{#ifexpr:(161)=(16)|Template:FormattingError|{{#ifexpr:16<0|−}}{{#ifexpr:abs(161)>10*abs(16)|{{#expr:abs(16)}}|{{#expr:trunc(abs(16))}}.{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>14|Template:FormattingError|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=1|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E1mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=2|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E2mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=3|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E3mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=4|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>4|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E4mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=5|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E5mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=6|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E6mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=7|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>7|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E7mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=8|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E8mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=9|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E9mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=10|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>10|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E10mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=11|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E11mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=12|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E12mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=13|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>13|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E13mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=14|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E14mod10}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
   |#default={{#ifexpr:(161)=(16)|Template:FormattingError|{{#ifexpr:16<0|−}}{{#ifexpr:abs(161)>10*abs(16)|{{#expr:abs(16)}}|{{#expr:trunc(abs(16))}}.{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>14|Template:FormattingError|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=1|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E1mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=2|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E2mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=3|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E3mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=4|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>4|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E4mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=5|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E5mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=6|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E6mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=7|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>7|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E7mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=8|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E8mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=9|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E9mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=10|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>10|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E10mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=11|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E11mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=12|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E12mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=13|{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>13|}}{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E13mod10}}{{#ifexpr:{{#expr:(-ln(abs(161)-abs(16))/ln10round 0)-1}}>=14|{{#expr:{{#expr:abs(161)-trunc(abs(161))}}*1E14mod10}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
  }}
  |false=16
 }}
 |text=16
}}
|e

}}. If there are more of such entries they are mutually sorted alphabetically (primarily based on the text).

[edit] Parameters

The template has only one parameter: a real number without thousand separators.

[edit] Example

{{Nts|123456789.00123}}

expands to

 <span style="display:none">&0000000123456789.001230</span> 123,456,789.00123 

which is rendered as {{#if:123456789.00123

|{{Number table sorting/{{#ifexpr:123456789.00123<0
  |negative
  |positive
 }}
 |1={{#expr:abs 123456789.00123}}
}}{{#ifeq:|yes
 |
 |{{#ifeq:{{{format}}}|no
  |123456789.00123 
  |123,456,789.00123
 }}
}}

}}

[edit] Debug option

Template:Xpdop3pec

[edit] More examples

Below are more examples, also illustrating the limitations mentioned above.

Note: Javascript sorting order: &+,-.0123456789Ee~

}} }} }} }} }} }} }} }} }} }} }} }}
sortkey and number
{{#if: {{Number table sorting/{{#ifexpr:{{{1}}}<0 negative positive
 }}
1={{#expr:abs {{{1}}}}}
}}{{#ifeq:|yes
no {{{1}}} {{{1}}}
 }}
}}

}}

{{#if: {{Number table sorting/{{#ifexpr:<0 negative positive
 }}
1={{#expr:abs }}
}}{{#ifeq:|yes
no
 }}
}}

}}

{{#if:between 2 and 3 {{Number table sorting/{{#ifexpr:between 2 and 3<0 negative positive
 }}
1={{#expr:abs between 2 and 3}}
}}{{#ifeq:|yes
no between 2 and 3 between 2 and 3
 }}
}}

}}

{{#if:approx. 10 {{Number table sorting/{{#ifexpr:approx. 10<0 negative positive
 }}
1={{#expr:abs approx. 10}}
}}{{#ifeq:|yes
no approx. 10 approx. 10
 }}
}}

}}

{{#if:-5 {{Number table sorting/{{#ifexpr:-5<0 negative positive
 }}
1={{#expr:abs -5}}
}}{{#ifeq:|yes
no
{{#if:-4 {{Number table sorting/{{#ifexpr:-4<0 negative positive
 }}
1={{#expr:abs -4}}
}}{{#ifeq:|yes
no
{{#if:-73 {{Number table sorting/{{#ifexpr:-73<0 negative positive
 }}
1={{#expr:abs -73}}
}}{{#ifeq:|yes
no
{{#if:-67 {{Number table sorting/{{#ifexpr:-67<0 negative positive
 }}
1={{#expr:abs -67}}
}}{{#ifeq:|yes
no
{{#if:123.456e3 {{Number table sorting/{{#ifexpr:123.456e3<0 negative positive
 }}
1={{#expr:abs 123.456e3}}
}}{{#ifeq:|yes
no 123.456e3 123.456e3
 }}
}}

}}

{{#if:20345678901234567.12345678 {{Number table sorting/{{#ifexpr:20345678901234567.12345678<0 negative positive
 }}
1={{#expr:abs 20345678901234567.12345678}}
}}{{#ifeq:|yes
no 20345678901234567.12345678 20,345,678,901,234,567.12345678
 }}
}}

}}

{{#if:100345678901234567.12345678 {{Number table sorting/{{#ifexpr:100345678901234567.12345678<0 negative positive
 }}
1={{#expr:abs 100345678901234567.12345678}}
}}{{#ifeq:|yes
no 100345678901234567.12345678 100,345,678,901,234,567.12345678
 }}
}}

}}

{{#if:1234567890123456.12345678 {{Number table sorting/{{#ifexpr:1234567890123456.12345678<0 negative positive
 }}
1={{#expr:abs 1234567890123456.12345678}}
}}{{#ifeq:|yes
no 1234567890123456.12345678 1,234,567,890,123,456.12345678
 }}
}}

}}

{{#if:234567890123456.12345678 {{Number table sorting/{{#ifexpr:234567890123456.12345678<0 negative positive
 }}
1={{#expr:abs 234567890123456.12345678}}
}}{{#ifeq:|yes
no 234567890123456.12345678 234,567,890,123,456.12345678
 }}
}}

}}

{{#if:34567890123456.12345678 {{Number table sorting/{{#ifexpr:34567890123456.12345678<0 negative positive
 }}
1={{#expr:abs 34567890123456.12345678}}
}}{{#ifeq:|yes
no 34567890123456.12345678 34,567,890,123,456.12345678
 }}
}}

}}

{{#if:4567890123456.12345678 {{Number table sorting/{{#ifexpr:4567890123456.12345678<0 negative positive
 }}
1={{#expr:abs 4567890123456.12345678}}
}}{{#ifeq:|yes
no 4567890123456.12345678 4,567,890,123,456.12345678
 }}
}}

}}

{{#if:567890123456.12345678 {{Number table sorting/{{#ifexpr:567890123456.12345678<0 negative positive
 }}
1={{#expr:abs 567890123456.12345678}}
}}{{#ifeq:|yes
no 567890123456.12345678 567,890,123,456.12345678
 }}
}}

}}

{{#if:67890123456.12345678 {{Number table sorting/{{#ifexpr:67890123456.12345678<0 negative positive
 }}
1={{#expr:abs 67890123456.12345678}}
}}{{#ifeq:|yes
no 67890123456.12345678 67,890,123,456.12345678
 }}
}}

}}

{{#if:7890123456.12345678 {{Number table sorting/{{#ifexpr:7890123456.12345678<0 negative positive
 }}
1={{#expr:abs 7890123456.12345678}}
}}{{#ifeq:|yes
no 7890123456.12345678 7,890,123,456.12345678
 }}
}}

}}

{{#if:890123456.12345678 {{Number table sorting/{{#ifexpr:890123456.12345678<0 negative positive
 }}
1={{#expr:abs 890123456.12345678}}
}}{{#ifeq:|yes
no 890123456.12345678 890,123,456.12345678
 }}
}}

}}

{{#if:90123456.12345678 {{Number table sorting/{{#ifexpr:90123456.12345678<0 negative positive
 }}
1={{#expr:abs 90123456.12345678}}
}}{{#ifeq:|yes
no 90123456.12345678 90,123,456.12345678
 }}
}}

}}

{{#if:0123456.12345678 {{Number table sorting/{{#ifexpr:0123456.12345678<0 negative positive
 }}
1={{#expr:abs 0123456.12345678}}
}}{{#ifeq:|yes
no 0123456.12345678 0,123,456.12345678
 }}
}}

}}

{{#if:123456.12345678 {{Number table sorting/{{#ifexpr:123456.12345678<0 negative positive
 }}
1={{#expr:abs 123456.12345678}}
}}{{#ifeq:|yes
no 123456.12345678 123,456.12345678
 }}
}}

}}

{{#if:23456.12345678 {{Number table sorting/{{#ifexpr:23456.12345678<0 negative positive
 }}
1={{#expr:abs 23456.12345678}}
}}{{#ifeq:|yes
no 23456.12345678 23,456.12345678
 }}
}}

}}

{{#if:3456.12345678 {{Number table sorting/{{#ifexpr:3456.12345678<0 negative positive
 }}
1={{#expr:abs 3456.12345678}}
}}{{#ifeq:|yes
no 3456.12345678 3,456.12345678
 }}
}}

}}

{{#if:456.12345678 {{Number table sorting/{{#ifexpr:456.12345678<0 negative positive
 }}
1={{#expr:abs 456.12345678}}
}}{{#ifeq:|yes
no 456.12345678 456.12345678
 }}
}}

}}

{{#if:56.12345678 {{Number table sorting/{{#ifexpr:56.12345678<0 negative positive
 }}
1={{#expr:abs 56.12345678}}
}}{{#ifeq:|yes
no 56.12345678 56.12345678
 }}
}}

}}

{{#if:6.12345678 {{Number table sorting/{{#ifexpr:6.12345678<0 negative positive
 }}
1={{#expr:abs 6.12345678}}
}}{{#ifeq:|yes
no 6.12345678 6.12345678
 }}
}}

}}

{{#if:.12345678 {{Number table sorting/{{#ifexpr:.12345678<0 negative positive
 }}
1={{#expr:abs .12345678}}
}}{{#ifeq:|yes
no .12345678 .12345678
 }}
}}

}}

{{#if:0.12345678 {{Number table sorting/{{#ifexpr:0.12345678<0 negative positive
 }}
1={{#expr:abs 0.12345678}}
}}{{#ifeq:|yes
no 0.12345678 0.12345678
 }}
}}

}}

{{#if:0.02345678 {{Number table sorting/{{#ifexpr:0.02345678<0 negative positive
 }}
1={{#expr:abs 0.02345678}}
}}{{#ifeq:|yes
no 0.02345678 0.02345678
 }}
}}

}}

{{#if:0.00345678 {{Number table sorting/{{#ifexpr:0.00345678<0 negative positive
 }}
1={{#expr:abs 0.00345678}}
}}{{#ifeq:|yes
no 0.00345678 0.00345678
 }}
}}

}}

{{#if:0.00045678 {{Number table sorting/{{#ifexpr:0.00045678<0 negative positive
 }}
1={{#expr:abs 0.00045678}}
}}{{#ifeq:|yes
no 0.00045678 0.00045678
 }}
}}

}}

{{#if:0.00005678 {{Number table sorting/{{#ifexpr:0.00005678<0 negative positive
 }}
1={{#expr:abs 0.00005678}}
}}{{#ifeq:|yes
no 0.00005678 0.00005678
 }}
}}

}}

{{#if:0.00000678 {{Number table sorting/{{#ifexpr:0.00000678<0 negative positive
 }}
1={{#expr:abs 0.00000678}}
}}{{#ifeq:|yes
no 0.00000678 0.00000678
 }}
}}

}}

{{#if:0.00000078 {{Number table sorting/{{#ifexpr:0.00000078<0 negative positive
 }}
1={{#expr:abs 0.00000078}}
}}{{#ifeq:|yes
no 0.00000078 0.00000078
 }}
}}

}}

{{#if:0.00000008 {{Number table sorting/{{#ifexpr:0.00000008<0 negative positive
 }}
1={{#expr:abs 0.00000008}}
}}{{#ifeq:|yes
no 0.00000008 0.00000008
 }}
}}

}}

{{#if:.00000008 {{Number table sorting/{{#ifexpr:.00000008<0 negative positive
 }}
1={{#expr:abs .00000008}}
}}{{#ifeq:|yes
no .00000008 .00000008
 }}
}}

}}

{{#if:0 {{Number table sorting/{{#ifexpr:0<0 negative positive
 }}
1={{#expr:abs 0}}
}}{{#ifeq:|yes
no 0 0
 }}
}}

}}

[edit] See also

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.
Personal tools