public static double binomialCoefficientLn(int n, int k) { if (!(n >= k)) { throw new Exception("n<k not allowed"); } return(Factorial.ln(n) - Factorial.ln(k) - Factorial.ln(n - k)); }
public static double binomialCoefficientLn(int n, int k) { QL_REQUIRE(n >= k, () => "n<k not allowed"); return(Factorial.ln(n) - Factorial.ln(k) - Factorial.ln(n - k)); }