From 6f5a27c4188dcadcc7ff57d7f09685fa3cf44dba Mon Sep 17 00:00:00 2001 From: Arthur Drobot Date: Tue, 25 Jul 2017 14:18:00 -0700 Subject: [PATCH] Fix intPow loop. --- src/org/nwapw/abacus/number/NaiveNumber.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/nwapw/abacus/number/NaiveNumber.java b/src/org/nwapw/abacus/number/NaiveNumber.java index ec9e6ba..6ad43f1 100755 --- a/src/org/nwapw/abacus/number/NaiveNumber.java +++ b/src/org/nwapw/abacus/number/NaiveNumber.java @@ -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;