Message6269
Logged In: YES
user_id=31435
The desire is understandable but this isn't the right way
to do it, so I'm rejecting this. While 2.2a2 changed the
specifics, the general rule remains that
pow(a, b, c) == a**b % c
except that the LHS may be very much faster for large
integer arguments.
"The right way" to do modular arithmetic is to define a
class for it, and do the full job (+ - * /, not just
modular pow). egcd is easy to code in Python, and because
it's an obscure speciality need (it gets asked about maybe
twice per year on c.l.py) doesn't really belong in the core
even if it weren't. I'm not even sure how 3-argument pow
got in, but am grateful it did and don't want to press our
luck <wink>. |
|
Date |
User |
Action |
Args |
2007-08-23 13:56:03 | admin | link | issue457066 messages |
2007-08-23 13:56:03 | admin | create | |
|