mirror of
https://github.com/DanilaFe/abacus
synced 2025-04-21 16:18:44 -07:00
Fix intPow loop.
This commit is contained in:
parent
54340ada63
commit
1112dafadf
@ -44,7 +44,7 @@ public class NaiveNumber implements NumberInterface {
|
|||||||
@Override
|
@Override
|
||||||
public NumberInterface intPow(int exponent) {
|
public NumberInterface intPow(int exponent) {
|
||||||
NumberInterface power = this;
|
NumberInterface power = this;
|
||||||
for(int currentExponent = 1; currentExponent <= exponent; currentExponent++){
|
for(int currentExponent = 1; currentExponent < exponent; currentExponent++){
|
||||||
power = power.multiply(this);
|
power = power.multiply(this);
|
||||||
}
|
}
|
||||||
return power;
|
return power;
|
||||||
|
Loading…
Reference in New Issue
Block a user