As Felipe notes, the main term should be li(x)/\phi(q). Replacing this in your definition of $E(x,a,q)$ above we have that, the best that is know even on the GRH is that $E(x,a,q) = O(x^{1/2}\log x)$. This estimate doesn't get better when $q$ is large (compared to $x$) and a lot more is believed to be true. For instance Montgomery conjectures that $E(x,a,q) = O_{\epsilon}( x^{1/2+\epsilon}/ q^{1/2})$ (see Conjecture 13.9 in his book on Multiplicative Number Theory).
Mark Lewko
- 13k
- 1
- 55
- 87