mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	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. ........
This commit is contained in:
		
							parent
							
								
									88968ad380
								
							
						
					
					
						commit
						fdb0accc31
					
				
					 1 changed files with 11 additions and 11 deletions
				
			
		| 
						 | 
					@ -989,17 +989,17 @@ _fsum_realloc(double **p_ptr, Py_ssize_t  n,
 | 
				
			||||||
   def msum(iterable):
 | 
					   def msum(iterable):
 | 
				
			||||||
       partials = []  # sorted, non-overlapping partial sums
 | 
					       partials = []  # sorted, non-overlapping partial sums
 | 
				
			||||||
       for x in iterable:
 | 
					       for x in iterable:
 | 
				
			||||||
       i = 0
 | 
					           i = 0
 | 
				
			||||||
       for y in partials:
 | 
					           for y in partials:
 | 
				
			||||||
           if abs(x) < abs(y):
 | 
					               if abs(x) < abs(y):
 | 
				
			||||||
           x, y = y, x
 | 
					                   x, y = y, x
 | 
				
			||||||
           hi = x + y
 | 
					               hi = x + y
 | 
				
			||||||
           lo = y - (hi - x)
 | 
					               lo = y - (hi - x)
 | 
				
			||||||
           if lo:
 | 
					               if lo:
 | 
				
			||||||
           partials[i] = lo
 | 
					                   partials[i] = lo
 | 
				
			||||||
           i += 1
 | 
					                   i += 1
 | 
				
			||||||
           x = hi
 | 
					               x = hi
 | 
				
			||||||
       partials[i:] = [x]
 | 
					           partials[i:] = [x]
 | 
				
			||||||
       return sum_exact(partials)
 | 
					       return sum_exact(partials)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   Rounded x+y stored in hi with the roundoff stored in lo.  Together hi+lo
 | 
					   Rounded x+y stored in hi with the roundoff stored in lo.  Together hi+lo
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue