L
lawrence.jones
Ben Pfaff said:Which one?
The one from 4.4 BSD (and quite likely other releases, too):
return ((next = next * 1103515245 + 12345) % 0x80000000;
Note how they cleverly expanded the range of the traditional
implementation by increasing the modulus and removing the division that
was there to avoid returning the distressingly non-random low-order bits
of the internal state.