Consider a positive definite and primitive integral binary quadratic form
$\displaystyle f(x,y) = ax^2 + bxy + cy^2$
which is reduced in the Gaussian sense: that is, we have the inequalities
$\displaystyle |b| \leq a \leq c, a > 0.$
Consider the counting function
$\displaystyle N_f(X) = \# \{(u,v) \in \mathbb{Z}^2 : f(u,v) \leq X \}.$
It is elementary that
$\displaystyle N_f(X) \sim \frac{\pi X}{\sqrt{4ac - b^2}}$
Let
$\displaystyle E_f(X) = \left \lvert N_f(X) - \frac{\pi X}{\sqrt{4ac - b^2}} \right \rvert.$
It is equally elementary to show that
$E_f(X) = O \left(\frac{X^{1/2}}{a} \right).$
However, surely a better upper bound for $E_f(X)$ is known. For example, in the case wen $a = c = 1, b = 0$ one has the bound
$E_{x^2 + y^2}(X) = O \left(X^{\frac{131}{416}} \right)$
according to Wikipedia; the exponent being due to Huxley.
In general, what is known about the error term $E_f(X)$? Both the exponent of $X$ and the dependence on $a,b,c$ or $D = 4ac - b^2$ are of interest.