... you start with non-zero ...
Not sure what you're talking about.
n times adding x to zero is mathematically (but not necessarily numerically) the same as n * x.
$ perl -le '$sum += 1 for 1..40; print $sum' 40
So where is the problem? I think you overlooked that $sum is initially undef/zero.
In reply to Re^3: Is this odd behavior a floating point problem?
by Eliya
in thread Is this odd behavior a floating point problem?
by wickedjester
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |