Implementing Simpson's rule for Riemann sums.