renamed inf and sup to min and max