]> granicus.if.org Git - python/commitdiff
Merged revisions 82223 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Fri, 25 Jun 2010 20:23:41 +0000 (20:23 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Fri, 25 Jun 2010 20:23:41 +0000 (20:23 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r82223 | mark.dickinson | 2010-06-25 21:22:24 +0100 (Fri, 25 Jun 2010) | 9 lines

  Merged revisions 82221 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r82221 | mark.dickinson | 2010-06-25 21:19:48 +0100 (Fri, 25 Jun 2010) | 1 line

    Fix indentation of Python code example in C comment.
  ........
................

Modules/mathmodule.c

index 50dd43ef9f3d08ea3f089360238f9b238c5357ad..05bad5de6e4dd58597031f466b0c96507694e0cb 100644 (file)
@@ -490,17 +490,17 @@ _fsum_realloc(double **p_ptr, Py_ssize_t  n,
    def msum(iterable):
        partials = []  # sorted, non-overlapping partial sums
        for x in iterable:
-       i = 0
-       for y in partials:
-           if abs(x) < abs(y):
-           x, y = y, x
-           hi = x + y
-           lo = y - (hi - x)
-           if lo:
-           partials[i] = lo
-           i += 1
-           x = hi
-       partials[i:] = [x]
+           i = 0
+           for y in partials:
+               if abs(x) < abs(y):
+                   x, y = y, x
+               hi = x + y
+               lo = y - (hi - x)
+               if lo:
+                   partials[i] = lo
+                   i += 1
+               x = hi
+           partials[i:] = [x]
        return sum_exact(partials)
 
    Rounded x+y stored in hi with the roundoff stored in lo.  Together hi+lo