GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — Template:Sum - Wikipedia

Permanently protected template
Template documentationviewedithistorypurge

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"
Categories:
  • Templates based on the Math Lua module
  • Mathematical function templates
Hidden category:
  • Wikipedia semi-protected templates
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.