Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

sigma

Format: sigma( f(x), x, x1, x2, step )

Arguments: (num) f(x) Function or expression to be summed

(node) x Name of the input variable in f(x)

(num) x1 Lower limit

(num) x2 Upper limit

(num) step Optional step size; default = 1

Returns: (num) Sum of f(x) for x equal to all numbers from x1 to x2 inclusive in increments of step

Description: Sigma is equivalent to the standard mathematical expression

  dph00486.gif

Sigma creates a temporary variable named x. If a node with this name already exists, it is replaced for all evaluations of f(x) and is then restored to its original state.

If the upper limit in the summation is infinity, sigma will add terms until the magnitude of the last term is less than the maximum error allowed based on the precision setting. This technique will provide a result that is accurate to the required precision if the series being summed is an alternating power series such as the Taylor series expansion for sin(x).

Note: If the expression f(x) is a tree node rather than a function based on x, the reset primitive must be used to cause the tree to recalculate on each iteration. Constants retain their value from the first evaluation and return this value on all subsequent evaluations. To cause the constant to be reevaluated, use an expression similar to

sigma({reset,f},x,x1,x2)

rather than

sigma(f,x,x1,x2)

Examples: sigma(n^2,n,1,5) = 55  (1+4+9+16+25)

f(n):=-1^n/n!

sigma(f(n),n,0,4) = 0.375

See Also: sum, for, infinity, precision

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend