[issue37893] pow() should disallow inverse when modulus is +-1

Tim Peters report at bugs.python.org
Tue Aug 20 13:38:19 EDT 2019


Tim Peters <tim at python.org> added the comment:

Yup, you have a point there! :-)  I guess I'm just not used to 0 being a multiplicative identity.

Don't know what other systems do.  Playing with Maxima, modulo 1 it seems to think 0 is the inverse of everything _except_ for 0.  `inv_mod(0, 1)` returns `false`.  Modulo -1, everything I tried returned `false`.

Which makes less sense to me.

Fine by me if you want to close this as "not a bug".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37893>
_______________________________________


More information about the Python-bugs-list mailing list