[Python-checkins] r82221 - python/trunk/Modules/mathmodule.c
mark.dickinson
python-checkins at python.org
Fri Jun 25 22:19:48 CEST 2010
Author: mark.dickinson
Date: Fri Jun 25 22:19:48 2010
New Revision: 82221
Log:
Fix indentation of Python code example in C comment.
Modified:
python/trunk/Modules/mathmodule.c
Modified: python/trunk/Modules/mathmodule.c
==============================================================================
--- python/trunk/Modules/mathmodule.c (original)
+++ python/trunk/Modules/mathmodule.c Fri Jun 25 22:19:48 2010
@@ -934,17 +934,17 @@
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
More information about the Python-checkins
mailing list