On Nov 8, 12:08 pm, Bram Moolenaar <[email protected]> wrote: > > Generating the float random number from an int looks strange. > Is that really needed? The computations look like we are dropping some > bits. >
I haven't looked at the patch, but I have learned recently that some pseudo-random algorithms generate numbers with low bits that rarely, if ever, change. I once spent over an hour trying to figure out why my unit test for a piece of code wasn't doing anything, and discovered that the pseudo-random generator used by my flavor of the C libraries was always returning multiples of 4. The workaround was to drop the low bits before using the number. Perhaps this is the reason for dropping bits here? -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
