val2 = zeros(max_iter, dtype=dtype)  # Second Richardson extrapolation