Implements Richardson extrapolation.