My understanding of Common Lisp pseudorandom number generation is that (random 1.0)
will generate a fraction strictly less than 1. I would like to get numbers upto 1.0 inclusive. Is this possible? I guess I could decide on a degree of precision and generate integers and divide by the range but I'd like to know if there is a more widely accepted way of doing this. Thanks.
Aucun commentaire:
Enregistrer un commentaire