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

Ian Kelly ian.g.kelly at gmail.com
Wed Sep 17 20:03:27 CEST 2014


On Wed, Sep 17, 2014 at 9:10 AM, Chris Angelico <rosuav at gmail.com> wrote:
> And while it's
> conceivable to define that infinity divided by anything is infinity,
> and infinity modulo anything is zero, that raises serious issues of
> primality and such; I'm not sure that that would really help anything.

I missed that this point was already discussed. Can you elaborate on
the "serious issues of primality and such"? Since infinity is not a
natural number, its primality is undefined, so I don't see the issue
here.



More information about the Python-list mailing list