1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-23 07:50:09 -08:00

Fix exp function

This commit is contained in:
Riley Jones 2017-08-04 13:52:41 -07:00
parent f3758c83a9
commit 50b0c86edd

View File

@ -429,7 +429,7 @@ public class StandardPlugin extends Plugin {
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.add((new NaiveNumber(1)).promoteTo(numberClass))){
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(Thread.currentThread().isInterrupted())
return null;