Fix doc comment for sumKbn (#15769)

Co-authored-by: b3liever <b3liever@yandex.com>
This commit is contained in:
Antonis Geralis 2020-10-29 18:54:28 +02:00 • committed by GitHub
commit 912d8f80ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@
func sumKbn*[T](x: openArray[T]): T = func sumKbn*[T](x: openArray[T]): T =
## Kahan (compensated) summation: O(1) error growth, at the expense ## Kahan-Babuška-Neumaier summation: O(1) error growth, at the expense
## of a considerable increase in computational expense. ## of a considerable increase in computational expense.
if len(x) == 0: return if len(x) == 0: return
var sum = x[0] var sum = x[0]