Compute the exact probability of k successes, and
the Poisson approximation to it with . Return the absolute
difference.
The approximation is good when n is large and p small, and visibly poor when
p is not small. Returning the error rather than either value makes that
trade-off the answer.
Input
n = 1000
p = 0.001
k = 1
Output
0.0001840470877805811