summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-06-25 20:19:48 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-06-25 20:19:48 (GMT)
commit32a16cac7072288121a580748303a0896871271c (patch)
tree749f91d8a8fcf3048b2cc15d2727769dc181c86b /Modules
parent0dddf600d480108040557ebb24584ae86cf46a09 (diff)
downloadcpython-32a16cac7072288121a580748303a0896871271c.zip
cpython-32a16cac7072288121a580748303a0896871271c.tar.gz
cpython-32a16cac7072288121a580748303a0896871271c.tar.bz2
Fix indentation of Python code example in C comment.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/mathmodule.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index b3b80f4..cd74b0d 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -934,17 +934,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