Equation for genus 2 curves I found the following claim (in Milne, p.2):

... every curve of genus 2 has an equation of the form
$$Y^2Z^4=f_0X^6+f_1X^5Z+\cdots +f_6Z^6.$$

I tried to check that such curves have genus $g=2$.
First by the Jacobian criterion, it has one singular point $\mathcal{O}=(0:1:0)$.
Then by the genus-degree formula,
$$g=(6-1)(6-2)/2-r(r-1)/2$$
where $r$ is the "ordinary singularity multiplicity" of $\mathcal{O}$ (I don't understand what this means). But there is no integer $r$ such that $g=2$, this is weird.
Please show me the correct discussion.
 A: First, an ordinary $r$-fold singularity is one with $r$ distinct tangent directions. That's not what you have here - the equation of curve near the singular point is $z^4=f_0x^6+\cdots+f_6z^6$, and the lowest-degree term is $z^4$, so the point does not have distinct tangents. (Here, tangent directions correspond to factors of the lowest homogeneous term of an equation for the curve at the singular point.)
To actually solve the problem, we have to do a bit more. If $C$ is a curve on a surface $X$, we can produce a resolution of singularities by successively blowing up singular points until there are no more singular points. Each time we do this, the arithmetic genus drops by $\frac12 r(r-1)$, where $r$ is the multiplicity of the point we blew up, and eventually we get a smooth curve where the arithmetic genus and geometric genus are the same. (For an ordinary $r$-fold singularity, one blowup resolves it, so you can see how this procedure recovers the formula you found.)
To demonstrate this process for your curve, we blow up the point at infinity by setting $z=tx$, getting $$t^4x^4-f_0x^6-f_1x^6t-\cdots-f_6x^6t^6=x^4(t^4-f_0x^2-f_1x^2t-\cdots-f_6x^2t^6).$$
This subtracts $\frac12(4)(4-1)=6$, leaving a curve of arithmetic genus 4.
The equation $t^4-f_0x^2-f_1x^2t-\cdots-f_6x^2t^6$ is the equation of the strict transform of your curve, and it's still singular at $(0,0)$. So we again blowup, setting $x=tx_1$, getting $$t^4-f_0x_1^2t^2-f_1x_1^2t^3-\cdots-f_6x_1^2t^8=t^2(t^2-f_0x_1^2-\cdots-f_6x_1^2t^6).$$
This subtracts $\frac12(2)(1)=1$, leaving a curve of arithmetic genus 3.
The equation $t^2-f_0x_1^2-\cdots-f_6x_1^2t^6$ is the equation of the strict transform of your curve, and it's still singular, but one more blowup fixes it: setting $x_1=tx_2$, we get $$t^2-f_0x_2^2t^2-\cdots-f_6x_2^2t^8=t^2(1-f_0x_2^2-\cdots-f_6x_2^2t^6)$$ which is nonsingular.
This again subtracts $\frac12(2)(1)=1$, leaving a curve of genus 2.
For a more detailed reference on how this works, consult a text on singularities of curves: Hartshorne chapter V section 3 is one source I've used in the past; Wall's Singular Points of Plane Curves is also fun but it's a bit longer and from a slightly different direction.
