Use Double.PositiveInfinity instead of Double.Max