n=100000000 hn=0.0 for k in n:-1:1 hn+=1.0/k end @printf("gamma(%d) = %.14f\n",n,hn-log(n))