A computing system program product for use at a configured computing system that comprises one or more computing devices and one or more storage media, each computing device comprising one or more processors, the computing system program product comprising one or more non-transitory computing-device-readable storage media having stored thereon computing-device-executable instructions that, when executed by at least one of the one or more computing devices, cause the configured computing system to perform a method to eliminate rounding error accumulation in iterative calculation of a function for a modified primary computation window of one or more data sources, the method including steps to:
- a. initialize, by the configured computing system, one or more components of a function for a pre-modified primary computation window which has a size of n (n>1) and comprises n groups of data elements, wherein each group of data elements comprises k (k≥1) data elements from one or more data sources accessible by the configured computing system;
- b. initialize, by the configured computing system, one or more components of the function for each of one or more, l (l≥1), pre-modified backup computation windows successively, wherein the one or more pre-modified backup computation windows start at different time points and each pre-modified backup computation window has an initial size of n (mod r) (r≥1) and comprises the latest n (mod r) groups of data elements from the one or more data sources at each respective starting time point;
- c. access, by the configured computing system and from the one or more data sources, r groups of data elements to be added to the pre-modified primary computation window, wherein each group of data elements comprises k data elements;
- d. modify, by the configured computing system, the pre-modified primary computation window by:
- removing the earliest accessed r groups of data element(s) from the pre-modified primary computation window;
- and
- adding the to-be-added r groups of data element(s) to the pre-modified primary computation window;
- e. modify, by the configured computing system, the l pre-modified backup computation windows one by one, including to modify each respective one computation window of the l pre-modified backup computation windows, by:
- adding the to-be-added r groups of data element(s) to the respective one pre-modified backup computation window;
- and
- modifying the respective one pre-modified backup computation window's size by adding r;
- f. iteratively derive, by the configured computing system and based on the one or more components of the function for the pre-modified primary computation window, one or more components of the function for the modified primary computation window;
- g. incrementally derive, by the configured computing system and based on the one or more components of the function for each of the l pre-modified backup computation windows, one or more components of the function for each corresponding modified backup computation window of the l modified backup computation windows;
- h. generate, by the configured computing system, at least one computing result of the function for the modified primary computation window based on one or more of the iteratively derived components;
- i. perform, by the configured computing system, steps c, d, e, f, g, and h until any one of the l modified backup computation windows reaches a size equal to n−r;
- j. perform, by the configured computing system, steps c, d, e, f, and g;
- k. generate, by the configured computing system, at least one computing result of the function for a computation window with a size n based on one or more of the derived components;
- and
- l. exchange, by the configured computing system, the modified primary computation window and a modified backup computation window with size n by indicating the modified backup computation window as a pre-modified primary computation window and resetting the modified primary computation window to a pre-modified backup computation window, wherein the resetting comprises resetting the modified primary computation window to contain the latest n (mod r) groups of data elements, setting the modified primary computation window size to n (mod r), indicating the modified primary computation window as a pre-modified backup computation window, and initializing one or more components of the function for the pre-modified backup computation window.