I tried to compute the value of the following expression in Matlab:
$$ 2^l\sum_{i=0}^{n-1}{N\choose i}\varepsilon^i(1-\varepsilon)^{N-i} $$
where $N=16272$, $n=499$, $l=107$, $\varepsilon=0.02$.
I tried to use nchoosek(n, k) but I got warnings of “Result may not be exact. The coefficient has a maximum relative error of 4.2633e-14, corresponding to absolute error
1.147533136012604e+104. ” The result is NaN, which is obviously wrong.
Is the way I calculate the binomial coefficient wrong? And how can I solve this problem in Matlab?