From wikipedia:
As you can see, this formula is based on using a random number uniformly distributed on (0,1) and produces fractions. Math.random in JavaScript produces numbers on [0,1).
What formula (or better yet, code) would allow me to generate inclusively bounded random Pareto integer using Math.random?
I'm looking for this kind of API:
function getRandomParetoIntInclusive(min, max, alpha = 1)

Aucun commentaire:
Enregistrer un commentaire