Improved phi(x, a)