diff --git a/src/exponent.c b/src/exponent.c index bef7597..feea7d7 100644 --- a/src/exponent.c +++ b/src/exponent.c @@ -30,12 +30,15 @@ double expIN(double e, double num){ else{ return (1.0 / expI((e*-1), num)); } - }else{ + }else if(num > 0.0){ if(e>0.0){ return exponential(e*logN(num, 0.00000001)); } + else{ + return (1.0 / exponential((-1*e)*logN(num, 0.00000001))); + } } - return 0; + return -1; } unsigned long long fac(int x){