En Tue, 08 May 2007 14:14:58 -0300, Greg Corradini  
<[EMAIL PROTECTED]> escribió:

> I'm running descriptive stats on mileages from a database (float numbers,
> about a million records). My sum returns 1.#QNAN, which I understand from
> searching this forum is an error.
>
> While I'm looking for help in solving this problem, I'm more interested  
> in a
> general explanation about the cause of this problem. Any ideas?

If you are summing a million floating point numbers, using a naive  
algorithm may give you wrong results.
Look for "Kahan summation algorithm" (even discussed some weeks ago in  
this group).

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to