http://qs1969.pair.com?node_id=1178713


in reply to Re^4: rand() function on Windows systems (pure Perl)
in thread rand() function on Windows systems

Small correction in the code above:

This line of code :

return ( ( $seed >> 16 ) & 32767 ) / 32767 * $max;

should be:

return ( ( $seed >> 16 ) & 32767 ) / 32768 * $max;
The difference can be seen if you don't use the integer (int) function.