The random function doesn't often include the highest number
http://xyzan-02.blog.so-net.ne.jp/2012-04-20
今の実装だと、ちょうど 1.0 になるときだけ<max number>が返るようですね。1,000,000/32768≒30.51なので、確率的にもこれで正しいと思います。
This issue fixed on next release.
Thanks.
This snapshot includes the fix.
The foillowing command:
random Val 10
Should assign the variable "Val" with a random number from 0 to 10. However, testing this function, the random numb is evenly distributed from 0 to 9, and only very rarely is 10. Using 10 is just an example, using other values, the highest expected value is hardly ever there. Using version 4.89 and the command above, the distribution obtained from 1,000,000 calls was: