Difference between revisions of "Product Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.0}}</noinclude> | <noinclude>{{Manual Page|version=4.0}}</noinclude> | ||
{{command|list}} | {{command|list}} | ||
− | ; Product[List of Numbers]: Calculates the product of all numbers in the list. | + | ;Product[ <List of Numbers> ] |
− | ; Product[List of Numbers, Number of Elements]:Calculates the product of the first ''n'' list elements. | + | :Calculates the product of all numbers in the list. |
− | {{example|1=<code>Product[{1,2,3,4},3]</code> | + | ;Product[ <List of Numbers>, <Number of Elements>] |
+ | :Calculates the product of the first ''n'' list elements. | ||
+ | {{example|1=<div><code><nowiki>Product[{1, 2, 3, 4}, 3]</nowiki></code> yields the number ''6''.</div>}} | ||
==CAS Specific Syntax== | ==CAS Specific Syntax== | ||
In [[CAS View]] only the following syntax is allowed: | In [[CAS View]] only the following syntax is allowed: | ||
− | ; Product[<List of expressions>]: Calculates the product of all elements in the list. | + | ;Product[ <List of expressions> ]: |
− | ; Product[<Expression>, <Variable>, <Start>, <End>]: Calculates the product of the expressions that are obtained by replacing the given variable with every integer from ''start'' to ''end''. | + | Calculates the product of all elements in the list. |
− | + | ;Product[ <Expression>, <Variable>, <Start>, <End> ] | |
− | :{{ | + | :Calculates the product of the expressions that are obtained by replacing the given variable with every integer from ''start'' to ''end''. |
− | :* <code>Product[{1,2,x}]</code> | + | :{{example|1=<div> |
− | :* <code>Product[x+1, x, 2, 3]</code> | + | :* <code><nowiki>Product[{1, 2, x}]</nowiki></code> yields ''2x''. |
+ | :* <code><nowiki>Product[x + 1, x, 2, 3]</nowiki></code> yields ''12''.</div>}} |
Revision as of 13:24, 23 August 2011
- Product[ <List of Numbers> ]
- Calculates the product of all numbers in the list.
- Product[ <List of Numbers>, <Number of Elements>]
- Calculates the product of the first n list elements.
Example:
Product[{1, 2, 3, 4}, 3]
yields the number 6.CAS Specific Syntax
In CAS View only the following syntax is allowed:
- Product[ <List of expressions> ]
Calculates the product of all elements in the list.
- Product[ <Expression>, <Variable>, <Start>, <End> ]
- Calculates the product of the expressions that are obtained by replacing the given variable with every integer from start to end.
- Example:
Product[{1, 2, x}]
yields 2x.Product[x + 1, x, 2, 3]
yields 12.