User Guide

ExamplesCalling Sequence Syntax
> seq(u, u in [Pi/4, Pi^2/2, 1/Pi]);
seq(expression, name in expression);
Adding and Multiplying Expressions
The add and mul commands add and multiply sequences of expressions
over a range of index values or the operands of an expression. See Table 8.4.
Table 8.4: The add and mul Commands
ExamplesCalling Sequence Syntax
> add(exp(x), x = 2..4);
> mul(2*x, x = 1 .. 10);
add(expression, name = initial .. final);
mul(expression, name = initial .. final);
> add(u, u in [Pi/4, Pi/2, Pi]);
> mul(u, u in [Pi/4, Pi/2, Pi]);
add(expression, name in expression);
mul(expression, name in expression);
The endpoints of the index range (initial and final) in the add and mul
calling sequence must evaluate to numeric constants. For information on
symbolic sums and products, refer to the ?sum and ?product help pages.
334 8 Basic Programming