1.#QNAN Solution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Greg Corradini

    #1

    1.#QNAN Solution


    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.

  • Grant Edwards

    #2
    Re: 1.#QNAN Solution

    On 2007-05-08, Greg Corradini <gregcorradini@ 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


    An overview of IEEE Standard 754 floating-point representation.


    --
    Grant Edwards grante Yow! Spreading peanut
    at butter reminds me of
    visi.com opera!! I wonder why?

    Comment

    • Greg Corradini

      #3
      Re: 1.#QNAN Solution


      Thanks for you help Grant

      Grant Edwards wrote:
      >
      On 2007-05-08, Greg Corradini <gregcorradini@ 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
      >

      An overview of IEEE Standard 754 floating-point representation.

      >
      --
      Grant Edwards grante Yow! Spreading peanut
      at butter reminds me of
      visi.com opera!! I wonder why?
      --

      >
      >
      --
      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.

      Comment

      Working...