anchor.diff:      [?_assertEqual(0, square_sum([])),
        ?_assertEqual(2/3, square_sum([3, 4, 5])),
        ?_assertEqual(0.0, square_sum([3, 3, null, 3, null]))
  +    ].
  +
  +minimum_test_() ->
  +    [?_assertEqual(0, safe_minimum([23, 0])),
  +     ?_assertEqual(0, safe_minimum([23, 0, 1, null])),
  +     ?_assertEqual(-1, safe_minimum([null, 0, -1, null])),
  +     ?_assertEqual(-1, safe_minimum(pseudo_values([null, 0, -1, null]))),
  +     ?_assertEqual(null, safe_minimum([]))
       ].
   
   percentile_test_() ->
  
positive.code:                       S#series{values=Values}
                end, Series);
  
  % removeAboveValue
  evaluate_call(<<"removeAboveValue">>, [Series, Val], _From, _Until, _Now) when is_number(Val) ->
      lists:map(fun(S) ->
  
negative.code: evaluate_call(<<"derivative">>, [Series], _From, _Until, _Now) ->
      lists:map(fun(S) -> S#series{values=derivative(S#series.values)} end, Series);
  
  % invert
  evaluate_call(<<"invert">>, [Series], _From, _Until, _Now) ->
      lists:map(fun(S) ->
                        S#series{values=process_series_values(S#series.values, fun safe_invert/1)}
                end, Series);
  
  % limit
  evaluate_call(<<"limit">>, [Series, N], _From, _Until, _Now) when is_number(N) ->
      lists:sublist(Series, N);
  