From 5a1a05ddad060c1b70802cd680bad7ab232537f3 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 5 Aug 2017 18:23:24 -0700 Subject: [PATCH] Remove the correct unused intPow function. --- .../org/nwapw/abacus/plugin/StandardPlugin.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java b/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java index c123caa..86f4ac1 100755 --- a/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java +++ b/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java @@ -531,22 +531,6 @@ public class StandardPlugin extends Plugin { return theta; } - public static NumberInterface intPow(NumberInterface number, Class numberClass, NumberInterface exponent) { - if (exponent.compareTo((new NaiveNumber(0)).promoteTo(numberClass)) == 0) { - return (new NaiveNumber(1)).promoteTo(numberClass); - } - boolean takeReciprocal = exponent.compareTo((new NaiveNumber(0)).promoteTo(numberClass)) < 0; - exponent = FUNCTION_ABS.apply(exponent); - NumberInterface power = number; - for (NumberInterface currentExponent = (new NaiveNumber(1)).promoteTo(numberClass); currentExponent.compareTo(exponent) < 0; currentExponent = currentExponent.add((new NaiveNumber(1)).promoteTo(numberClass))) { - power = power.multiply(number); - } - if (takeReciprocal) { - power = (new NaiveNumber(1)).promoteTo(numberClass).divide(power); - } - return power; - } - @Override public void onEnable() { registerNumberImplementation("naive", IMPLEMENTATION_NAIVE);