INF does not work for me, I had to put min=numeric_limits<double>::infinity() and max=-min for your code to work
INF does not work for me, I had to put min=numeric_limits::infinity() and max=-min for your code to work