[issue457066] pow(a,b,c) should accept b<0

2022-04-10 Thread admin
Change by admin : -- github: None -> 35082 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue457066] pow(a,b,c) should accept b<0

2012-01-22 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: For anyone who finds this through google, if you are finding the inverse mod a prime, you can use fermats little theorem: pow(a, -1, mod) = pow(a, a-2, mod). (You also need that mod doesn't divide a). -- nosy: +Thomas.Dybdahl.Ahle ___