samedi 9 mars 2019

Why does random.uniform(0, float("inf")) always return inf?

I was playing around with the random module in python and I found that this code always returns inf:

import random

print(random.uniform(0, float("inf")))

I was wondering why and if there is another way of doing this so that it does not always return inf.




Aucun commentaire:

Enregistrer un commentaire