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.
In reply to Re^4: inclusive rand
by pryrt
in thread inclusive rand
by msh210
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |