Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))`

Ian Kelly ian.g.kelly at gmail.com
Thu Sep 18 19:05:00 CEST 2014

On Thu, Sep 18, 2014 at 10:35 AM,  <chris.barker at noaa.gov> wrote:
> It's be nice if Python's math module did more than simply wrap the default i implementation of the underlying C lib -- it's gotten better over the years (Inf and NaN used to be really hard to get), but still not quite what it could be.

I think there's not a whole lot that can be done due to backward
compatibility issues. Python 3 did make some progress (e.g. math.floor
now returns an int instead of a float).

More information about the Python-list mailing list