Thanks for you help Grant Grant Edwards wrote: > > On 2007-05-08, Greg Corradini <[EMAIL PROTECTED]> wrote: > >> 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. > > Not necessarily. You've ended up with a floating point "not a > number" value (AKA a NaN). That might or might not be an > error. Whether it's an error not not depends on your input > data and your algorithm. > >> While I'm looking for help in solving this problem, I'm more >> interested in a general explanation about the cause of this >> problem. > > If you're asking how you end up with a NaN, there are several > ways to generate a NaN: > > 0/0 > > Inf*0 > > Inf/Inf > > Inf-Inf > > Almost any operation on a NaN > > http://en.wikipedia.org/wiki/NaN > http://steve.hollasch.net/cgindex/coding/ieeefloat.html > > -- > Grant Edwards grante Yow! Spreading peanut > at butter reminds me of > visi.com opera!! I wonder why? > -- > http://mail.python.org/mailman/listinfo/python-list > >
-- View this message in context: http://www.nabble.com/1.-QNAN-Solution-tf3710941.html#a10382201 Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list