mardi 12 juin 2018

Does rand() / RAND_MAX return[0, 1) or [0,1]?

I have looked at many places and cannot seem to find the answer. I understand that the probability of rand() / RAND_MAX == 1 is low because rand() is unlikely to equal RAND_MAX. However is it theoretically possible as I saw someone write on something similar that the range is [0, 1), however I do not understand why.

Thanks!




Aucun commentaire:

Enregistrer un commentaire