MySQL, on most machines, uses 64-bit IEEE 754 floating point arithmetic for its calculations.
In integer contexts it uses integer arithmetic.
RAND()
is not a perfect random number generator. It is mainly used to quickly generate pseudorandom numbers