Difference between revisions of "Template:Val/delimitnum"
Jump to navigation
Jump to search
blackwiki>Verdy p m (simplifying by inlining (parameters are simpler), we can test the precision loss earlier, before outputing the sign) |
blackwiki>Jason Quinn (two spell fixes) |
||
| Line 3: | Line 3: | ||
-->{{FormattingError|Too Many Digits|nocategory={{{nocategory|}}}}}<!-- | -->{{FormattingError|Too Many Digits|nocategory={{{nocategory|}}}}}<!-- | ||
-->|<!-- No loss of precision, can display this number | -->|<!-- No loss of precision, can display this number | ||
| − | -->{{#ifexpr:{{{1|0}}}<0|−}}<!-- Output the mathematical minus sign (not the minus- | + | -->{{#ifexpr:{{{1|0}}}<0|−}}<!-- Output the mathematical minus sign (not the minus-hyphen) if negative |
| − | -->{{#ifexpr:abs({{{1|0}}}1)>10*abs({{{1|0}}})|<!-- Number is an integer (no dot): | + | -->{{#ifexpr:abs({{{1|0}}}1)>10*abs({{{1|0}}})|<!-- Number is an integer (no dot): appending a non-zero digit multiplies it by more than 10 |
-->{{formatnum:{{#expr:abs({{{1|0}}})}}}}<!-- Format the integer using locale's separator for grouping digits | -->{{formatnum:{{#expr:abs({{{1|0}}})}}}}<!-- Format the integer using locale's separator for grouping digits | ||
-->|<!-- Number is not an integer (at least contains a dot) | -->|<!-- Number is not an integer (at least contains a dot) | ||