windows fix for numeric_limits<double>::max();