anchor.diff:      Samples6 = [{hit_ratio,
                    lists:zipwith(fun(undefined, _) -> 0;
                                     (_, undefined) -> 0;
  -                                  (Hits, Gets)   ->
  -                                       float(trunc((1000.0 * Hits) /
  -                                                   (1000.0 * Gets)) /
  -                                             1000.0)
  +                                  (Hits, Gets)   -> float_round(Hits / Gets)
                                  end,
                                  proplists:get_value("get_hits", Samples5),
                                  proplists:get_value("cmd_get", Samples5))} |
  
positive.code: avg([], Sum, Count)      -> float(Sum) / float(Count);
  avg([H | R], Sum, Count) -> avg(R, Sum + H, Count + 1).
  
  -ifdef(EUNIT).
  
  test() ->
  
negative.code:     ?assertEqual(0.0, avg([])),
      ?assertEqual(5.0, avg([5])),
      ?assertEqual(5.0, avg([5, 5, 5])),
      ?assertEqual(5.0, avg([0, 5, 10])),
      ok.
  
  float_round_test() ->
      ?assertEqual(0.01, float_round(0.0100001)),
      ?assertEqual(0.08, float_round(0.0800001)),
      ?assertEqual(1.08, float_round(1.0800099)),
      ok.
  
  -endif.
  
  