An analysis of Ralston's quadrature