Dunno if it matters, but
0 + 1 + 2 + .. + ($n-1)
can be calculated using
$n * ($n-1) / 2
So
( 0 + 1 + 2 + .. + ($n-1) ) / $n
is simply
($n-1) / 2
In reply to Re^3: A script with a loop is running my computer Out of memory
by ikegami
in thread A script with a loop is running my computer Out of memory
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |