Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In weight_based_sort() function: - Changed RAND_MAX to RAND_MAX + 1 to make sure that quotient is always less than 1 - Changed float to double to avoid rounding errors, particularly when the value of rand() nears RAND_MAX and thus the quotient could round to 1 (cherry picked from commit 6ef8168)
- Loading branch information