Template:Sum
Revision as of 12:59, 5 November 2019 by Wikipedia>MusikBot II (Protected "Template:Sum": High-risk template or module (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)))
Usage
This template uses Lua: |
This template performs addition. For example, if you want to add 2 and 3, use this: {{Sum|2|3}}, which creates 5. It handles positive and negative integers, fractions, and decimals to thirteen decimal points:
- {{sum|-3|1}} produces: -2
- {{sum|1|0.5}} produces: 1.5
- {{sum|1|2/3}} produces: 1.6666666666667
It also handles some symbols such as "pi" (π):
- {{sum|pi|0}} produces 3.1415926535898
More than two parameters may be employed:
- {{sum|1|1|1}} produces 3
It does not accept commas or spaces for thousands separator.
See also
- {{Product}}