1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-04 15:32:59 -08:00

Fix exp function

This commit is contained in:
Riley Jones 2017-08-04 13:52:41 -07:00
parent 4369eba107
commit f8bf60f383

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;