3 ms·
That's an elegant way of doing it. The cool thing about these kinds of algorithms is that there are multiple forms with different numerical and performance beha
by qppo 6y ago
That's an elegant way of doing it. The cool thing about these kinds of algorithms is that there are multiple forms with different numerical and performance behaviors, and it can be tough to pick the best one for the given context. The more classical formal methods are the state-space canonical forms [0] which can be derived for higher order sequences and may be faster than a prefix sum implementation, or might not be, or may be better behaved numerically.
[0] https://www.engr.mun.ca/~millan/Eng6825/canonicals.pdf https://www.engr.mun.ca/~millan/Eng6825/canonicals.pdf