Hacker News new | ask | show | jobs
by Tepix 3198 days ago
Indeed! Also if $RANDOM is too small for your needs, you can use $RANDOM$RANDOM (and it will have different values)
1 comments

$RANDOM$RANDOM doesn't have uniform distribution.

Use $((RANDOM + (RANDOM << 15))) instead.