Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
fun rms(v: real vector) =
|
||||
let
|
||||
val v' = Vector.map (fn x => x*x) v
|
||||
val sum = Vector.foldl op+ 0.0 v'
|
||||
in
|
||||
Math.sqrt( sum/real(Vector.length(v')) )
|
||||
end;
|
||||
|
||||
rms(Vector.tabulate(10, fn n => real(n+1)));
|
||||
Loading…
Add table
Add a link
Reference in a new issue