anchor.diff:      safe_min(Vs, min(Val, Min)).
   
   
  +-spec safe_max_compare(metric_value(), metric_value()) -> metric_value().
   safe_max_compare(A, null) -> A;
   safe_max_compare(null, B) -> B;
   safe_max_compare(A, B) -> max(A, B).
   
   
  +-spec safe_range(variadic_metrics()) -> metric_value().
   safe_range(Vs) ->
       safe_range(Vs, {null, null}).
   
  
positive.code: safe_div(A, B) -> A / B.
  
  
  sort_non_null(Values) ->
      sort_non_null(Values, [], 0).
  
  
negative.code:     safe_stddev(Vs, Avg, Sum + Dev, Len + 1).
  
  
  -spec safe_sum(variadic_metrics()) -> number().
  safe_sum(Vs) ->
      safe_sum(Vs, 0).
  
  