Talk:Greatest subsequential sum: Difference between revisions

no edit summary
No edit summary
Line 20:
 
:It is wholly sensible to specify summation such that zero is the result of summation of a list of no elements. While this is not derivable from the qualities of addition, it may be established by definition. The value of avoiding exceptional conditions is very high. To have summation defined for all nonnegative integers allows many things to be specified simply that would otherwise involve messy special-case handling. One important result is notational clarity. For the unusual situations where summation should be rejected for lists shorter than two elements, input qualification testing will suffice. --[[User:TBH|TBH]] 06:15, 4 January 2008 (PST)
 
==Some bugs==
The second Python version (and probably other versions, I have fixed the D version) have bugs, try:
[-1, 1, 2, -5, -6]
Anonymous user