Tag Info

New answers tagged


Even simpler, depending on the speed of your random generator, you can just generate two values and average them. [Edit: even more simple, where X is the result of the rng, first double y = double(1/x); then x = y*[maximum return value of rng]; This will weight numbers exponentially to the lower numbers.] Generate and average more values to increase the ...

Top 50 recent answers are included