(* [rms x y] is root mean square of [x] and [y]*)
(* assert (abs_float (rms 5. 4. -. 4.52769256907 ) < 1e-5) *)
let rms x y =
  let x2 = x *. x in
  let y2 = y *. y in
  let mean_square = (x2 +. y2) /. 2. in Float.sqrt mean_square