You are viewing a single comment's thread. Return to all comments →
Seems you are not using fast exponentiation. Check following properties
1 , b == 0 a^b = (a^(b/2))^2 , even b (a^((b-1)/2))^2 * a , odd b
Here complexity will be O(log b) instead of O(b).
Edit: Check this wiki page.
Seems like cookies are disabled on this browser, please enable them to open this website
Expressions V2
You are viewing a single comment's thread. Return to all comments →
Seems you are not using fast exponentiation. Check following properties
Here complexity will be O(log b) instead of O(b).
Edit: Check this wiki page.