in reply to Re^3: inclusive rand
in thread inclusive rand

Since irand($n) returns [0,$n) => [0,$n-1] -- ie, not including $n -- you would have to divide by 524287 to get [0,1] inclusive.

Replies are listed 'Best First'.
Re^5: inclusive rand
by marioroy (Prior) on Mar 13, 2017 at 17:36 UTC

    Thank you, pryrt. I applied the correction.