Anonymous user
Cumulative standard deviation: Difference between revisions
m
→{{header|OCaml}}: whitespace
m (→{{header|D}}: whitespace) |
m (→{{header|OCaml}}: whitespace) |
||
Line 525:
=={{header|OCaml}}==
<lang ocaml>let sqr x = x *. x
let stddev l =
Line 541 ⟶ 539:
Printf.printf "List: ";
List.iter (Printf.printf "%g ") l;
Printf.printf "\nStandard deviation: %g\n" (stddev l)</lang>
Sample output:
|