Probability, Statistics, Data Science, Mathematics.
N=1000000, s=0.1 and p=0.3, it gives the precise answer k=262437. For small N and large s it’s occasionally off by one. eg N=3, s=1.5 and p=0.738 gives a 2 when it should give a 1. Mean accuracy should never be less than 99%. I want to speed it up! Here’s some ideas: Rewrite it in C. Use fewer