News for hackers. Stuff that matters.
Re:Libsodium 1.0.0 released by mjevans on Wednesday September 24, 2014 @07:53PM (#8364812)
Now that you mention it, that would also be an issue for the technique you describe; specifiable to the rounding characteristics for truncated numbers.

It's probably a better design idea to have a predictable sequence of float (like, application dependent) results and randomly select from within said sequence.

Re:Libsodium 1.0.0 released by ZoFreX on Wednesday September 24, 2014 @09:26PM (#8365065)
In my (naive and possibly flawed) tests, the division method is giving uniformly distributed results. Can you explain more what the limitations of that approach are?
Re:Libsodium 1.0.0 released by lmm on Thursday September 25, 2014 @07:57AM (#8366674)
The default rounding method is round-to-even, so e.g. 0.9999999 would be expected to come up slightly more often than 0.99999994 (the last two floats smaller than 1).

Being more precise would probably require thinking about all the possible int values.