robust handling of zero data points and infinity time