anchor.diff:      Avg = safe_average(Values),
       square_sum(Values, Avg, 0, 0).
   
  -square_sum([], Avg, Sum, Len) ->
  +square_sum([], _Avg, Sum, Len) ->
       Sum / Len;
   square_sum([{_TS, null} | Vs], Avg, Sum, Len) ->
       square_sum(Vs, Avg, Sum, Len);
  
positive.code:     end.
  
  
  safe_minimum([]) -> null;
  safe_minimum(Values) ->
      safe_minimum(Values, null).
  
negative.code:      ?_assertEqual(pseudo_series([1.5, 1.0], 30), consolidate(pseudo_series([1, null, 2, null, null, 1]), 3)),
       ?_assertEqual(pseudo_series([], 20), consolidate(pseudo_series([]), 2))
      ].
  
  normalize_test_() ->
      Series = [pseudo_series([1,1,1], 20), pseudo_series([2,2,2,2,2,2])],
      [?_assertEqual([pseudo_series([1,1,1], 20), pseudo_series([2.0,2.0,2.0], 20)], normalize([Series]))].
  
  percentile_test_() ->
      [?_assertEqual(null, percentile([], 50)),
  