i am using the random number generator provided with stl c++. how do we bias it so that it produces smaller random numbers with a greater probability than larger random numbers.
One simple way would be to take every random number generated in the range [0,1) and raise it to any power greater than 1, depending how skewed you want the results
2.1m questions
2.1m answers
60 comments
57.0k users