function Hser(p,q) hn=0.0; for k in q:-1:p hn+=1.0/k end return hn end n=1000000000 @printf("gamma(%d) = %.14f\n",n,Hser(1,n)-log(n))