More test values :)
On a RH 8.0 i686 box with a custom 2.4.20 kernel, with gcc 3.2 20020903
(Red Hat Linux 8.0 3.2-7) and with glibc 2.2.93
Value (i = index) BSD GLIBC
random() * mod 0.53 0.78
i % mod 0.15 0.64
i / (ITEMS / mod) 0.10 0.35
i ^ 0x5555555 0.39 0.54
--
Jean-Christian Imbeault