• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Sum

  • Template
  • Talk
  • Language
  • Watch
  • View source
(Redirected from Template:Addition)
Template documentation[view] [edit] [history] [purge]

Usage

This template uses Lua:
  • Module:Math (sandbox)

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" (π) or "e":

  • {{sum|pi|0}} produces 3.1415926535898
  • {{sum|e|0}} produces 2.718281828459

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

  • {{Multiply}}
The above documentation is transcluded from Template:Sum/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Sum&oldid=924743855"
Last edited on 5 November 2019, at 17:59

Languages

    • Afrikaans
    • Аԥсшәа
    • العربية
    • অসমীয়া
    • Azərbaycanca
    • বাংলা
    • Беларуская (тарашкевіца)
    • भोजपुरी
    • Cebuano
    • Čeština
    • Eesti
    • Español
    • فارسی
    • Français
    • Fulfulde
    • 한국어
    • हिन्दी
    • Bahasa Indonesia
    • Italiano
    • Македонски
    • മലയാളം
    • Bahasa Melayu
    • မြန်မာဘာသာ
    • Nederlands
    • 日本語
    • ଓଡ଼ିଆ
    • Oʻzbekcha / ўзбекча
    • ਪੰਜਾਬੀ
    • Português
    • Română
    • Scots
    • සිංහල
    • Simple English
    • سنڌي
    • Српски / srpski
    • Svenska
    • Tagalog
    • தமிழ்
    • တႆး
    • తెలుగు
    • ไทย
    • Türkçe
    • Українська
    • اردو
    • Tiếng Việt
    • 粵語
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 5 November 2019, at 17:59 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop