Closed Shihab-Shahriar closed 9 months ago
Code mostly taken from here, credits to Lemire.
For range N and floating point types, we use the basic rand() * N formula in the uniform method.
rand() * N
uniform
For integral type, uniform by default uses biased version. Users can use non-biased verison by directly invoking range.
range
Code mostly taken from here, credits to Lemire.
For range N and floating point types, we use the basic
rand() * N
formula in theuniform
method.For integral type,
uniform
by default uses biased version. Users can use non-biased verison by directly invokingrange
.