Plus
Plus(a, b, ...)
a + b + ...represents the sum of the terms
a, b, ....
Note: the Plus operator has the attribute Flat (associative property), Orderless (commutative property), OneIdentity and Listable.
Examples
>> 1 + 23Plus performs basic simplification of terms:
>> a + b + a2*a+b
>> a + a + 3 * a5*a
>> a + b + 4.5 + a + b + a + 2 + 1.5 * b6.5+3.0*a+3.5*bApply Plus on a list to sum up its elements:
>> Plus @@ {2, 4, 6}12The sum of the first 1000 integers:
>> Plus @@ Range(1000)500500Plus has default value 0:
>> a /. n_. + x_ :> {n, x}{0,a}
>> -2*a - 2*b-2*a-2*b
>> -4+2*x+2*Sqrt(3)-4+2*x+2*Sqrt(3)
>> 1 - I * Sqrt(3)1-I*Sqrt(3)
>> Head(3 + 2 I)Complex
>> N(Pi, 30) + N(E, 30)5.85987448204883847382293085463
>> N(Pi, 30) + N(E, 30) // Precision30Related terms
Flat, Listable, OneIdentity, Orderless
Implementation status
- ✅ - full supported