Template:Val/delimitnum: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>SkyLined
Reverted to revision 431613366 by Jason Quinn: Bad changes caused errors in negative numbers. (TW)
meta>Peter James
https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=537611659#Insidious_problem_with_pdf_rendering
Line 7: Line 7:
     -->{{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)
     -->{{formatnum:{{#expr:trunc(abs({{{1|0}}}))}}.}}<!-- Format the integer part using locale's separator for grouping digits, followed by the locale's separator before fractional decimals
     -->{{formatnum:{{#expr:trunc(abs({{{1|0}}}))}}}}.<!-- Format the integer part using locale's separator for grouping digits, followed by the locale's separator before fractional decimals
     -->{{val/delimitnum/fraction<!--
     -->{{val/delimitnum/fraction<!--
       -->|{{#expr:abs({{{1|0}}}1)-trunc(abs({{{1|0}}}1))}}<!-- The fractional part (appended with an extra digit 1 to avoid roundoff error on last displayed digit)
       -->|{{#expr:abs({{{1|0}}}1)-trunc(abs({{{1|0}}}1))}}<!-- The fractional part (appended with an extra digit 1 to avoid roundoff error on last displayed digit)

Revision as of 23:45, 10 February 2013