mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-13 14:19:53 -08:00
Fix intPow loop.
This commit is contained in:
parent
46da95e7b5
commit
6f5a27c418
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user