dimanche 29 mai 2016

Should I use randint?

The randint proposal is supposed to provide an intuitive interface for getting random integral numbers. The problem however is that it uses default_random_engine and so far has no way of letting you specify the engine it uses. libstdc++ and libc++ both use minstd_rand which is a LCG, which I've read creates poor quality numbers. MSVC uses mt19937 which seems to be the most common on this site.

Is this a big negative of randint?




Aucun commentaire:

Enregistrer un commentaire