無限倍 2

二十分開始 2

這段改編自 2010 年 8 月 5 日的對話。

.

昨天,HYC 跟我說,她不肯做化學科 past paper(過往試題)的原因是,她一嘗試開始做,就發覺幾乎題題也不懂做。結果,就只拿得 20 分,十分難看。

但是,你要意會到,你要一日未開始做,化學科的 past paper,你化學科的功力,就連那 20 分也沒有。你只有 0 分。

相反,如果你開始做了,第一份的 past paper,得到 20 分的話,你就是由 0 分進步至 20 分。試想想,由 0 分進步至 20 分,是進步了多少倍?

(CSY:無限倍。)

(CPK:哈哈!)

不是嗎?

— Me@2014.07.23

.

.

2014.07.23 Wednesday (c) All rights reserved by ACHK

LogGamma

Another way to compute the binomial coefficient when using large numbers is to recognize that


{n \choose k} = \frac{n!}{k!\,(n-k)!} = \frac{\Gamma(n+1)}{\Gamma(k+1)\,\Gamma(n-k+1)} = \exp(\ln\Gamma(n+1)-\ln\Gamma(k+1)-\ln\Gamma(n-k+1)),

where ( \ln \Gamma(n) ) denotes the natural logarithm of the gamma function at n. It is a special function that is easily computed and is standard in some programming languages such as using log_gamma in Maxima, LogGamma in Mathematica, gammaln in MATLAB, or lgamma in R. Roundoff error may cause the returned value to not be an integer.

— Wikipedia on Binomial coefficient

2014.07.23 Wednesday ACHK