Averages/Root mean square: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 8:
C.f. [[Averages/Pythagorean means]]
=={{header|AutoHotkey}}==
<lang autohotkey>MsgBox, % RMS(1, 10)
RMS(a, b) { ; Root Mean Square
n := b - a + 1
Loop, %n%
Sum += (a + A_Index - 1) * (a + A_Index - 1)
Return, Sqrt(Sum / n)
}</lang>
<pre>
6.204837
</pre>
=={{header|Clojure}}==
|