Range of quadratic functions