Statistics/Basic: Difference between revisions

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