let rec random_float_list d =
  if d <= 0
  then []
  else (Random.float 1.0) :: (random_float_list (d-1))