Statistics/Basic: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added a comment in the REXX section header.) |
m (→{{header|REXX}}: optimize the generation of random numbers.) |
||
Line 3,277: | Line 3,277: | ||
#.=0 /*count of the numbers in each bin. */ |
#.=0 /*count of the numbers in each bin. */ |
||
do j=1 for size /*generate some random numbers. */ |
do j=1 for size /*generate some random numbers. */ |
||
@.j=random( |
@.j=random(, 99999) / 100000 /*express random number as a fraction. */ |
||
_=substr(@.j'00', 3, 1) /*determine which bin the number is in,*/ |
_=substr(@.j'00', 3, 1) /*determine which bin the number is in,*/ |
||
#._=#._ + 1 /* ··· and bump its count. */ |
#._=#._ + 1 /* ··· and bump its count. */ |