1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-25 12:16:23 -07:00

Fix intPow loop.

This commit is contained in:
Arthur Drobot 2017-07-25 14:18:00 -07:00
parent 54340ada63
commit 1112dafadf

View File

@ -44,7 +44,7 @@ public class NaiveNumber implements NumberInterface {
@Override
public NumberInterface intPow(int exponent) {
NumberInterface power = this;
for(int currentExponent = 1; currentExponent <= exponent; currentExponent++){
for(int currentExponent = 1; currentExponent < exponent; currentExponent++){
power = power.multiply(this);
}
return power;