Best way to generate random floats over a wide range of magnitudes

If you need numbers with their log10 uniformly distributed between -16 and 0, as I guessed from the line of code, they can be generated with 10 ^ (-16*rand()).

2 Likes