public virtual dynamic SimpleInterestMethod(double principal, double rate, double time, int deniom) { if (principal < 0 || rate < 0 || time < 0) { throw new ArgumentOutOfRangeException(); } if (deniom < 0) { throw new DivideByZeroException(); } double result = _IMaths.Divide(_IMaths.Multiply(principal, rate, time), deniom); return(result); }
public double GetInterest(double principalAmount, float Year, double rate) => Maths.Multiply(principalAmount, Year, Maths.Divide(rate, 100));
public double GetInterest(double principalAmount, int Year, double rate, int n) => Maths.Multiply(principalAmount, Math.Pow(Maths.Add(1, Maths.Divide(rate, n)), Maths.Multiply(n, Year)));