Template:Decimals

From Ava Zinn Wiki
Revision as of 04:27, 7 March 2016 by Aeverinezinn (talk | contribs) (Created page with "<includeonly>{{#ifexpr: {{{2}}}<=0 | {{#expr:{{{1}}} round {{{2}}}}} | {{#expr:{{{1}}} round {{#ifexpr: {{{2}}}>12|12|{{{2}}}}}}}{{#ifexpr: ({{{2}}}>=1) and (({{{1}}} round 0)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]
Gnome-utilities-terminal.svg This template uses (or will be using) Lua programming language.

Please see Wikipedia:Lua if you want to learn more about Lua or help convert other templates.

Usage[edit]

{{Decimals|number|decimals}}

Note that results are limited to 15 significant figures.

Examples[edit]

  • {{Decimals|1234|-2}} → 1200
  • {{Decimals|1234|0}} → 1234
  • {{Decimals|1234|1}} → 1234.0
  • {{Decimals|1234|2}} → 1234.00
  • {{Decimals|9/8|5}} → 1.12500
  • {{Decimals|0.0000067890123456789012345|20}} → 6.789012E-6
  • {{Decimals|0.67890123456789012345|20}} → 0.678901234568
  • {{Decimals|67890.123456789012345|20}} → 67890.123456789000
  • {{Decimals|67890123456789012345|20}} → 6.7890123456789E+19.000000000000
  • {{Decimals|1/33|7}} → 0.0303030
  • {{Decimals|0.006|1}} → 0.0

See also[edit]

</div>

Navigation menu