Difference between revisions of "Template:Rnd/doc"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Usage: Restore 1e9 upper limit to docs, per pending edit request)
m (+ja)
Line 15: Line 15:
 
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
 
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
 
[[Category:Mathematical function templates]]
 
[[Category:Mathematical function templates]]
 +
 +
[[ja:Template:Rnd]]
 
</includeonly>
 
</includeonly>

Revision as of 04:39, 14 July 2008

Usage

This template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives) and includes trailing zeros. Scientific notation is used for numbers greater than or equal to 1×10Template:Val/delimitnum, or less than 1×10Template:Val/delimitnum.

Compare:

  • {{#expr:2.0004 round 3}} gives 2
  • {{rnd|2.0004|3}} gives 2.000
  • {{rnd|0.000020004|7}} gives 2.00×10−5
  • {{rnd|0|8}} gives 0.00000000
  • {{rnd|154268|-3}} gives 154,000
  • {{rnd|1542689271|-7}} gives 1.54×109