Been a while since I worked with RMS values, but from what I remember your code looks a little overcomplex. What's wrong with this:
sub rms { my $sq; $sq += $_ * $_ foreach @_; sqrt($sq/@_); }
In reply to Re: How do I get the root mean square of a list?
by davorg
in thread How do I get the root mean square of a list?
by larryk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |