def primdist(x):
  return max(0.0, -min(x))

dualdist = primdist
