For example. if you try binomialProbability( 171, 171, 0.5), you will get NaN. That's because combinations.js uses factorial function which doesnt't work for numbers greater than 170. You can use https://npmjs.com/package/big-factorial and build correct for big numbers combinations function, then use it in binomial-probability, or just type a warning in the Readme regarding the limitations (170 max)
In case somebody will face the same issue: you can use cephes library bdtr method to calculate cumulative binomial probability like this cephes.bdtr(successful, trials, average). It works with big numbers and works fast
For example. if you try binomialProbability( 171, 171, 0.5), you will get NaN. That's because combinations.js uses factorial function which doesnt't work for numbers greater than 170. You can use https://npmjs.com/package/big-factorial and build correct for big numbers combinations function, then use it in binomial-probability, or just type a warning in the Readme regarding the limitations (170 max)