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 phr
Recipients
Date 2001-09-01.21:05:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=72053

If b<0 uses egcd, then pow(4,-1,6) should definitely throw a
value error, like dividing by 0.  Pow isn't advertised as
computing gcd's.  It just happens that egcd is a way of
computing inverses mod n.

I'm fine with 3-arg pow throwing an error on non-integer
args.  I like that better than unexpected conversions.

How about continuing to throw an error on b<0, but adding
an egcd function to the math library?

What got me started on this was wanting a modular inverse,
not remembering how egcd worked and having to figure it
out again, and realizing I've been thru that same exercise
many times over the years :-).
History
Date User Action Args
2007-08-23 13:56:04adminlinkissue457066 messages
2007-08-23 13:56:04admincreate