Jump to content

Averages/Pythagorean means: Difference between revisions

(→‎min: add)
Line 2,166:
geometric_mean(L), numer; /* 4.528728688116765 */
harmonic_mean(L), numer; /* 3.414171521474055 */</syntaxhighlight>
 
=={{header|min}}==
<syntaxhighlight lang="min">'avg ^A
(dup product 1 rolldown size / pow) ^G
('size keep (1 swap /) (+) map-reduce /) ^H
 
(((1 10)) range (((A) (G) (H))) cleave) => (puts!) foreach</syntaxhighlight>
{{out}}
<pre>5.5
4.528728688116765
3.414171521474055</pre>
 
=={{header|Modula-2}}==
559

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.