Re: random numbers
Clinton Bunch <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
> > I think i know why, it's because zsh's RANDOM tops out at 32,767, but > this insures that the first digit of a string of random numbers isn't > random but strongly weighted to 1 and 2, with 3 also weighted. Is > this worth worrying about? I'd say so. Perhaps it should max out at > 10,000 or 100,000 or even offer a user selectable range? Or do we > have other tricks for coping with this? I find zsh to be quite > competent mathematically so having to use an external utility to get > really random numbers seems not up to snuff. > Check out the zsh/random module in the current test release and the zrand_int math function.