jeudi 23 septembre 2021

What is precision of MYSQL RAND() function? and how to generate huge random numbers?

MYSQL RAND() function is told to return floating-point number. But how precise is it? I.e. what is the maximum integer range [0,N] in which I can generate uniformly distributed random integer numbers with FLOOR(RAND()*N)?

How to generate numbers, which are bigger than N?




Aucun commentaire:

Enregistrer un commentaire