Hacker News new | ask | show | jobs
by Perepiska 775 days ago
pow(x,e,mod) was the reason I switched from Perl to Python :)
1 comments

Even better, they implement negative exponents as well, so you don't have to find a library or cobble together an extended gcd function, since you get in inverses for free.