samedi 2 janvier 2016

How to generate a series of unique double precision numbers in C++? [on hold]

I know how to generate a series of integer numbers between (low,high) by using the subscript as another look up map's subscript. While this might not work for the double number? Any better Solution? (Better with C++ 11)


While I mean for the double precision numbers.

Here is a detailed question:

If I want to generate 200 unique random double precision numbers between 1.0 and 10.0 uniformly, what should I do?

And Tony D's answer seems reasonable, I'll try it out.




Aucun commentaire:

Enregistrer un commentaire