dimanche 20 décembre 2015

Small probabilities in Python

How accurate is Python's random() function?

Assume I'd like to make a decision based on a 1 / 234276901 probability coin flip, can I still use a

if random() < 234276901:

statement?

How accurate would such statement be? (in terms of the actual probability the if will be taken).

Is there a more precise (yet running in reasonable time) way to get such coin flips?




Aucun commentaire:

Enregistrer un commentaire