Averages/Root mean square: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
Line 1,729: Line 1,729:


=={{header|zkl}}==
=={{header|zkl}}==
<lang zkl>fcn rms(z){(z.reduce(fcn(p,n){p+n*n},0.0)/z.len()).sqrt()}</lang>
<lang zkl>fcn rms(z){ ( z.reduce(fcn(p,n){ p + n*n },0.0) /z.len() ).sqrt() }</lang>
The order in the reduce function is important as it coerces n*n to float.
The order in the reduce function is important as it coerces n*n to float.
<pre>
<pre>