When I put in Python interpreter a ** b % c with large a (20 figures) b (4 figures) c (20 figures) I saw that Python calculates it pretty fast, almost like pow (a,b,c). I expect another behavior that Python first calculate a ** b then get the modulo (%) of result and such calculation will take significantly more time.
Where is the magic behind the scene?
Today's computers are amazingly fast, very complicated calculations can occur in what seems like no time at all. You need to repeat such calculations very many times to see the delay; I'd start with a million.
Behavior of Python ** and % operators with big numbers