tweaked Riemann sums to use interval midpoints
(#467)