CumProduct

Revision as of 00:53, 17 August 2010 by Lchrisman (talk | contribs) (Library)


CumProduct(x,I)

Returns an array with each element being the product of all of the elements of X along dimension I up to, and including, the corresponding element of X.

Examples

I → 1 2 3 4 5 6 7
X → 8 2 1 5 -3 0 4
Cumulate(X,I) → 8 16 16 80 -240 0 0

Library

Array functions

Optional Parameters

PassNull

CumProduct(X,I,passNull:true)

When the optional «passNull» is omitted or false, CumProduct ignores Null values. In that case they have essentially the same effect as a one, unless they happen to be the first value in «X», in which case they are passed since no numeric values are yet obtained.

When «passNull» is explicitly set to true, then Null values are passed through as Null in the result.

X → «null» «null» 4 2 «null» «null» 2 -1 3 2 «null»
CumProduct(X,I) → «null» «null» 4 8 8 8 16 -16 -48 -96 -96
CumProduct(X,I,passNull:false) → «null» «null» 4 8 8 8 16 -16 -48 -96 -96
CumProduct(X,I,passNull:true) → «null» «null» 4 8 «null» «null» 16 -16 -48 -96 «null»

See Also

Comments
Loading comments...