This line of code :
return ( ( $seed >> 16 ) & 32767 ) / 32767 * $max;
should be:
The difference can be seen if you don't use the integer (int) function.return ( ( $seed >> 16 ) & 32767 ) / 32768 * $max;
In reply to Re^5: rand() function on Windows systems (pure Perl)
by bakiperl
in thread rand() function on Windows systems
by bakiperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |