by lrkrsBlurkn · 2y ago · 0 comments
Prima facia, the way Id tackle it if I have a few extra registers is
1. Id write the exponent as n = R*m, where R is an integer. R = 2 is probably best.
2. Then Id do pascal's triangle (every element is a simple combination comb[x,y]) for the expansion of the exponent (if R = 2 binomial expansion) and add in ascending order.
3. Then raise the answer to the power of m.
Of course, I can iteratively do steps 1-2 if the interest rate is very small.