Calculates the cumulative sums of a tuple.
tuple_cumul returns the different cumulative sums of the corresponding elements of the input tuple Tuple, i.e. the i-th element of the result tuple Cumul is the sum of the first i elements of the input tuple Tuple. For example, if Tuple contains the values [1,2,3,4], the output tuple Cumul will contain the values [1,3,6,10]. All elements of Tuple must be numbers (integer or floating point numbers). Each element of the result tuple Cumul will contain a floating point number if at least one element of the caluculation is a floating point number. If all elements of the calculation are integer numbers the resulting sum in Cumul will also be an integer number.
|
Tuple (input_control) |
number(-array) -> integer / real |
| Input tuple. | |
|
Cumul (output_control) |
number(-array) -> real / integer |
| Cumulative sum of the corresponding tuple elements. | |
tuple_cumul is reentrant and processed without parallelization.
tuple_min2, tuple_max2, tuple_add
Foundation