function "converges" to prime counting function

90 Views Asked by At

Consider $f(x)=\ln(\pi(e^x))$ (blue) and $g(x)=\ln(li(e^x))$ (green). $\pi(x)$ is the prime counting function and $li(x)$ the logarithmic integral. I plotted these on SageCell and what surprised me is that the differences of $f$ and $g$ seem to tend to zero (at least in this interval) (red):

enter image description here

What am I missing here?

Is $g$ really that good of an approximation to this prime counting function $f$?