By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,923 Members | 1,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,923 IT Pros & Developers. It's quick & easy.

1.#QNAN Solution

P: n/a

Hello all,
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?

Thanks
Greg Corradini
--
View this message in context: http://www.nabble.com/1.-QNAN-Soluti...html#a10379999
Sent from the Python - python-list mailing list archive at Nabble.com.

May 8 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 2007-05-08, Greg Corradini <gr***********@gmail.comwrote:
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?
May 8 '07 #2

P: n/a

Thanks for you help Grant

Grant Edwards wrote:
>
On 2007-05-08, Greg Corradini <gr***********@gmail.comwrote:
>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-Soluti...html#a10382201
Sent from the Python - python-list mailing list archive at Nabble.com.

May 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.