public override double Evaluate(Dictionary <string, double> values) { double nValue = n.Evaluate((values)); double rValue = r.Evaluate((values)); if (nValue % 1 != 0) { throw new Exception("binomCoef only takes integer arguments. n = " + nValue); } if (rValue % 1 != 0) { throw new Exception("binomCoef only takes integer arguments. r = " + rValue); } return(Basic.BinomialCoefficient((long)nValue, (long)rValue)); }