示例#1
0
 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));
 }
示例#2
0
 private double calcSummand(uint index)
 {
     return(Math.Exp(-lambda_) * Math.Pow(lambda_, index) / Factorial.get(index));
 }