Previous Up Next

2.37.31  Product : product mul

See also 2.37.31, 2.42.6 and 2.42.8).

Product of values of an expression : product

product(expr,var,a,b,p) or mul(expr,var,a,b,p) returns the product of values of an expression ex when the variable var goes from a to b with a step p (by default p=1) : this syntax is for compatiblity with Maple.
Input :

product(x^2+1,x,1,4)

Or:

mul(x^2+1,x,1,4)

Output :

1700

Indeed 2*5*10*17=1700
Input :

product(x^2+1,x,1,5,2)

Or:

mul(x^2+1,x,1,5,2)

Output :

520

Indeed 2*10*26=520

Product of elements of a list : product

product or mul takes as argument a list l of reals (or floating numbers) or two lists of the same size (see also 2.37.31, 2.42.6 and 2.42.8).


Previous Up Next