 |
Plus
x
+
y
+
z represents a sum of terms.
Plus has attributes Flat, Orderless and OneIdentity. The default value for arguments of Plus, as used in x_. patterns, is 0. Plus[
] is taken to be 0. Plus[
x
] is x. x
+
0 evaluates to x, but x
+
0.0 is left unchanged. Unlike other functions, Plus applies built-in rules before user-defined ones. As a result, it is not possible to make definitions such as 2+2=5. See the Mathematica book: Section 1.1.1. See also: Minus, Subtract, AddTo, Increment.
Further Examples
This is a fast way to add up the elements of a list.
In[1]:= 
Out[1]= 
This shows how a sum is represented internally.
In[2]:= 
Out[2]//FullForm= 
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION. | | | |
 | |
|