This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients christian.heimes, marco.buttu, mark.dickinson, terry.reedy
Date 2013-07-29.21:46:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
+-infinity and nans were created for reasons that do not apply to standard python. In Fortran, C, etcetera, float arrays can only contain floats (hence calling a non-number a float) and continuing a computation after numerical error is more difficult or impossible. So something as simple as the following is not possible.

<initialize 1000 x 1000 data array>
for time in range(1, 1000):
  for x in range(1000):
    for y in range(1000):
        data[x][y] = <update>
      except Exception as e:
        data[x][y] = None  # will propagate just like NaNs!

I think we might be better with two consistently behaving float classes: proper Python floats with no inf or nan, just exceptions; and ieee floats, similar to Decimals, with as complete implementation of the ieee standard as possible, including various nan types and access to FPU flags. What we have now is a compromise that I doubt is truly satisfactory to anyone.
Date User Action Args
2013-07-29 21:46:31terry.reedysetrecipients: + terry.reedy, mark.dickinson, christian.heimes, marco.buttu
2013-07-29 21:46:31terry.reedysetmessageid: <>
2013-07-29 21:46:31terry.reedylinkissue18570 messages
2013-07-29 21:46:30terry.reedycreate