A basic combinatorial prob problem, which you will no doubt recognize, would have a solution: 1 - (1 - p)^n Any suggestion to calculate this, when n -> 10^5 ? Best I can think of is clip (n*p, -nan, 1)