<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ASum</id>
	<title>TI-BASIC:Sum - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ASum"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Sum&amp;action=history"/>
	<updated>2026-04-17T17:03:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Sum&amp;diff=910&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Sum&amp;diff=910&amp;oldid=prev"/>
		<updated>2016-02-24T18:24:55Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=SUM.GIF&lt;br /&gt;
|summary=Calculates the sum of all or part of a list.&lt;br /&gt;
|syntax=sum(&amp;#039;&amp;#039;list&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;start&amp;#039;&amp;#039;,[&amp;#039;&amp;#039;end&amp;#039;&amp;#039;}})&lt;br /&gt;
|location=Press:&lt;br /&gt;
# 2nd LIST to access the list menu.&lt;br /&gt;
# LEFT to access the MATH submenu.&lt;br /&gt;
# 5 to select sum(, or use arrows and ENTER.&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=1 byte&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
The sum( command calculates the sum of all or part of a list. &lt;br /&gt;
&lt;br /&gt;
When you use it with only one argument, the list, it sums up all the elements of the list. You can also give it a bound of &amp;#039;&amp;#039;start&amp;#039;&amp;#039; and &amp;#039;&amp;#039;end&amp;#039;&amp;#039; and it will only sum up the elements starting and ending at those indices (inclusive).&lt;br /&gt;
&lt;br /&gt;
 sum({1,2,3,4,5})&lt;br /&gt;
 	15&lt;br /&gt;
 sum({1,2,3,4,5},2,4)&lt;br /&gt;
 	9&lt;br /&gt;
 sum({1,2,3,4,5},3)&lt;br /&gt;
 	12&lt;br /&gt;
&lt;br /&gt;
= Optimization =&lt;br /&gt;
&lt;br /&gt;
If the value of &amp;#039;&amp;#039;end&amp;#039;&amp;#039; is the last element of the list, it can be omitted: &lt;br /&gt;
&lt;br /&gt;
 sum({1,2,3,4,5},3,5)&lt;br /&gt;
 can be&lt;br /&gt;
 sum({1,2,3,4,5},3)&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#domain|ERR:DOMAIN]]&amp;#039;&amp;#039;&amp;#039; is thrown if the starting or ending value aren&amp;#039;t positive integers.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#invaliddim|ERR:INVALID DIM]]&amp;#039;&amp;#039;&amp;#039; is thrown if the starting or ending value exceed the size of the list, or are in the wrong order.&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:Prod|Prod(]]&lt;br /&gt;
* [[TI-BASIC:Dim|Dim(]]&lt;br /&gt;
* [[TI-BASIC:Seq_List|seq(]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>