Template:Rnd

From Wikipedia, the free encyclopedia

[edit] Template documentation

Usage

This template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives), includes trailing zeros except in the range where E notation is used.

Compare:

  • {{#expr:2.0004 round 3}} gives 2 [1]Template:Xpd/
  • "{{rnd|2.0004|3}}" gives "2.000" [2]Template:Xpd/
  • "{{rnd|0.000020004|8}}" gives "2.0E-5000" [3]Template:Xpd/
  • "{{rnd|0|8}}" gives "0.00000000" [4]Template:Xpd/