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 rhettinger
Recipients lschoe, mark.dickinson, pablogsal, rhettinger, skrah, steven.daprano, tim.peters
Date 2019-02-19.18:27:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550600868.25.0.514000814856.issue36027@roundup.psfhosted.org>
In-reply-to
Content
> +1 for the pow(value, -1, modulus) spelling. It should raise
> `ValueError` if `value` and `modulus` are not relatively prime.

> It would feel odd to me _not_ to extend this to 
> `pow(value, n, modulus)` for all negative `n`, again
> valid only only if `value` is relatively prime to `modulus`.

I'll work up a PR using the simplest implementation.  Once that's in with tests and docs, it's fair game for someone to propose algorithmic optimizations.
History
Date User Action Args
2019-02-19 18:27:48rhettingersetrecipients: + rhettinger, tim.peters, mark.dickinson, steven.daprano, skrah, pablogsal, lschoe
2019-02-19 18:27:48rhettingersetmessageid: <1550600868.25.0.514000814856.issue36027@roundup.psfhosted.org>
2019-02-19 18:27:48rhettingerlinkissue36027 messages
2019-02-19 18:27:48rhettingercreate