Template:Val/delimitnum: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Jimp
mNo edit summary
meta>Jimp
use Module:Gapnum
Line 1: Line 1:
<includeonly><!--
<includeonly>{{#switch:{{{fmt}}}
                Test loss of precision by appending a fixed digit "1"
  |commas4={{#ifexpr:abs{{{1|0}}}<1E4
-->{{#ifexpr:({{{1|0}}}1)=({{{1|0}}})<!--
    |{{#invoke:String|replace|{{{1|0}}}|-|−}}
 
    |{{formatnum:{{#invoke:String|replace|{{{1|0}}}|-|−}}}}
   -->|<!--      Precision is lost. Display an error message.
  }}
  -->{{FormattingError|Too Many Digits|nocategory={{{nocategory|}}}}}<!--
   |commas={{#ifexpr:{{{1|0}}}<1E4
 
    |{{#switch:{{{u}}}
  -->|<!--       Precision is not lost. Display the number.
        |BC|AD|BCE|CE={{#expr:{{{1}}}}}
  -->{{val/delimitnum/{{{fmt|gaps}}}<!--
        |{{formatnum:{{#invoke:String|replace|{{{1|0}}}|-|−}}}}
                    -->{{#expr:{{{1|0}}}<0}}<!--
       }}
                    -->{{#expr:trunc({{{1|0}}}9)={{{1|0}}}9}}<!--
    |{{formatnum:{{{1|0}}}}}
    -->|{{{1|0}}}<!--
  }}
    -->|u={{{u}}}<!--
  |{{#ifexpr:{{{1|0}}}<1E4
   -->}}<!--
    |{{#switch:{{{u}}}
 
        |BC|AD|BCE|CE={{#expr:{{{1}}}}}
-->}}</includeonly><noinclude>{{documentation}}</noinclude>
        |{{#ifexpr:{{{1|0}}}<0
          |−{{#invoke:Gapnum|main|{{#invoke:String|replace|{{{1|0}}}|-}}}}
          |{{#invoke:Gapnum|main|{{{1|0}}}}}
        }}
      }}
    |{{#invoke:Gapnum|main|{{{1|0}}}}}
   }}
}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 10:10, 29 April 2015