Submitted by cmichel
When LibMath.sumN function does not check if n <= arr.length and can therefore fail if called with n > arr.length. The caller must always check that its called with an argument that is less than n which is inconvenient.
Recommend changing the condition to iterate up to min(n, arr.length).
raymogg (Tracer) confirmed
