Verify distribution uniformity/Naive: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: changed comments and whitespace, changed some variable names to be more descriptive, added commas to output for easier reading the results.)
m (→‎{{header|REXX}}: simplified the COMMAS function.)
Line 1,491: Line 1,491:
exit /*stick a fork in it, we're all done. */
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
/*──────────────────────────────────────────────────────────────────────────────────────*/
commas: procedure; parse arg _; n=_'.9'; #=123456789
commas: parse arg _; do jc=length(_)-3 to 1 by -3; _=insert(',', _, jc); end; return _</lang>
e=verify(n, #'0', , verify(n, #"0.",'M') ) - 4
do j=e to verify(n, #, "M") by -3; _=insert(',', _, j); end; return _</lang>
Execution note: &nbsp; quite a few runs were needed before a skewed result was obtained.
Execution note: &nbsp; quite a few runs were needed before a skewed result was obtained.
<br><br>
<br><br>