busy dealing with stupidities at work ... hehe as my co-worker put it "stupidities are supreme today" ... ft ...
【在 o********l 的大作中提到】 : we have missed a day in posting ... : hmmmm : where is everyone? : busy busy?
P*e
5 楼
自己定义? Try this: __int64 bigInteger;
!/
【在 g******r 的大作中提到】 : 需要计算Binomial(200, 160)的概率。问题是combination 的值用fractional 计算n!/ : k!(n-k)!在n和k比较大的时候总是overflow. C or C++ 用了unsigned long long 都不 : 解决问题。 : 望大侠支招。
【在 l*r 的大作中提到】 : busy dealing with stupidities at work ... hehe : as my co-worker put it "stupidities are supreme today" ... ft ...
D*a
8 楼
用sterling formula for factorial
!/
【在 g******r 的大作中提到】 : 需要计算Binomial(200, 160)的概率。问题是combination 的值用fractional 计算n!/ : k!(n-k)!在n和k比较大的时候总是overflow. C or C++ 用了unsigned long long 都不 : 解决问题。 : 望大侠支招。
【在 o********l 的大作中提到】 : excellent case of job security
g*r
11 楼
多谢。 when n = 164, k = 120, n!/(k!*(n-k)!) =1.8485678226083072e+40 This value is still overflow even self-define int64 or int128. Can I define a larger integer? Or if I use sterling formula for approximation, will there be big error? Thanks so much.
【在 g******r 的大作中提到】 : 多谢。 : when n = 164, k = 120, n!/(k!*(n-k)!) =1.8485678226083072e+40 : This value is still overflow even self-define int64 or int128. : Can I define a larger integer? : Or if I use sterling formula for approximation, will there be big error? : Thanks so much.
多谢。 when n = 164, k = 120, n!/(k!*(n-k)!) =1.8485678226083072e+40 This value is still overflow even self-define int64 or int128. Can I define a larger integer? Or if I use sterling formula for approximation, will there be big error? Thanks so much.
【在 g******r 的大作中提到】 : 多谢。 : when n = 164, k = 120, n!/(k!*(n-k)!) =1.8485678226083072e+40 : This value is still overflow even self-define int64 or int128. : Can I define a larger integer? : Or if I use sterling formula for approximation, will there be big error? : Thanks so much.
c*r
18 楼
Use logarithmic form
c*r
19 楼
If you want to compute the cdf, then use regularized Beta function
g*r
20 楼
Thank you so much. That's a good suggestion. Would you like to recommend any source code of the "regularized Beta function "
【在 c****r 的大作中提到】 : If you want to compute the cdf, then use regularized Beta function
b*p
21 楼
不要求太精确的话 直接用normal把, 不用要加个,或者减个0.5
!/
【在 g******r 的大作中提到】 : 需要计算Binomial(200, 160)的概率。问题是combination 的值用fractional 计算n!/ : k!(n-k)!在n和k比较大的时候总是overflow. C or C++ 用了unsigned long long 都不 : 解决问题。 : 望大侠支招。
c*r
22 楼
For C++, try gnu scientific library. For java, try apache math
【在 g******r 的大作中提到】 : Thank you so much. That's a good suggestion. : Would you like to recommend any source code of the "regularized Beta : function : "