Y
Hacker News
new
|
ask
|
show
|
jobs
by
lmcarreiro
2732 days ago
After you calc X^Y, when you will calc X^(Y+1), doesn't it worth to calc using the previous result (X^Y)*X instead of another power X^(Y+1) ?
1 comments
kazinator
2731 days ago
You will find here that the run-time is swamped by the digit breakdown and summing, so that exponentiation versus accumulated product doesn't make a palpable difference.
link