MathBinomialCoefficientLog
MathBinomialCoefficientLog
计算二项式系数的对数:Log(C(n,k))=Log(n!/(k!*(n-k)!))
整型参数版本:
double MathBinomialCoefficientLog(
const int n, // 元素总数
const int k // 组合的元素数
)真实型参数版本:
double MathBinomialCoefficientLog(
const double n, // 元素的总数
const double k //组合的元素数
)参数
- n
[in] 元素数量。
- k
[in] 每个组合的元素数量。
返回值
C(n,k)对数。