program foo
	integer i
	double precision s
	double precision last
	double precision diff
	integer print_steps
	parameter (print_steps = 1000000)

	i = 0
	s = 0.0
	last = 0.0
	do while (1 .eq. 1)
		i = i + 1
		s = s + 1.0/i
		diff = s - last
		if (mod(i, print_steps) .eq. 0) then
			write (*, '(f13.7 a f18.15)') s, ' ', diff
		end if
		last = s
	end do
end ! program foo
