Confusion about genus-degree formula My question regards a perplexity I have on how to apply the genus-degree formula for irreducible, projective, complex plane curves. Consider first the affine complex plane curve given by the equation
$$ C: \ (x-2)(x-1)(x+1)(x+2) -y^2 = x^4-5x^2+4 -y^2=0.$$
The Jacobian is given by $(x(2x+\sqrt{10})(2x-\sqrt{10}), -2y)$, so it never vanishes on $C$. Let us now look at the compactification $\hat{C}$, which has the same points as $C$ plus a point at infinity with coordinates $[x:y:z]=[0:1:0]$. This point lies in the affine chart with $y=1$, and the affine equation for $\hat{C}$ in terms of $x$ and $z$ in that chart is
$$ x^4-5z^2x^2+4z^4-z^2 = 0.$$
The differential $(4x^3-10xz^2, -10x^2z+16z^3-2z)$ vanishes at $(x,z)=(0,0)$, hence $\hat{C}$ has one singularity: the point at infinity. If we pretend for a moment that it doesn't (i.e., that it is smooth), one can do the "usual construction" to see that it is topologically a torus: one can draw two cuts along $[-2,-1]$ and $[1,2]$ on two copies of the Riemann sphere and glue them together with the right orientation. So if $\hat{C}$ were regular, it would be an elliptic curve, and in particular have genus $1$. However, the genus-degree formula for projective plane curves predicts genus $3$, since the equation of $\hat{C}$ has degree $4$. But the Wikipedia article on the genus-degree formula also mentions that the formula actually gives the arithmetic genus and that for every ordinary singularity of multiplicity $r$, the geometric genus is smaller than the arithmetic genus by $\frac{1}{2}r(r-1)$. Now, I am not really sure about how to measure the multiplicity of a singularity, but in this case it seems that for any value of $r \ge 0$, we never have that $3-\frac{1}{2}r(r-1)=1$. So the geometric intuition and the formula seem to disagree. The only other thing that comes to my mind is that I have not checked yet that $\hat{C}$ is irreducible, but this can be checked on $C$ using Eisentein's criterion applied to the polynomial ring $(\mathbb{C}[x])[y]$ using the prime ideal $\mathfrak{p}=(x+1)$.
Reassuming, my question is: what is the genus of $\hat{C}$? If it is $1$, why is the genus-degree formula wrong? If it is $3$, why is the geometric intuition wrong? After all, also the article of Wikipedia on elliptic curves seems to confirm that $\hat{C}$ should have genus $1$.
 A: I think the reason the formula does not apply is that the singularity is not an "ordinary singularity of multiplicity r" (a.k.a. $r$ distinct lines crossing at a point).
From your second chart, we have a cusp at the origin, and if we blow it up (basically substitute $xz$ for $z$ and factor out an $x^2$ -- this is equivalent to enlarging the coordinate ring by adjoining $z/x$, which is integral over it), we're left with
$$4 x^2 z^4-5 x^2 z^2+x^2-z^2=0$$
And the lowest degree part is $x^2 - z^2 = 0 = (x-z)(x+z)$,
so locally the singularity is now ordinary of multiplicity 2. If this were the entire singularity, we would just be subtracting $1$, but since we also needed the function $z/x$ to resolve the cusp, we also subtract one more.
More details to justify the last part. For any smooth projective curve $C$, let $f: \tilde{C} \to C$ be the normalization. There is a short exact sequence
$0 \to \mathcal{O}_C \to f_*\mathcal{O}_{\tilde{C}} \to F \to 0$,
where $F$ is supported only along the singularities of $C$, and is a finite-length $\mathcal{O}_C$-module. Let its length be $\ell$. The cohomology gives
$0 \to H^0(\mathcal{F}) \to H^1(\mathcal{O}_C) \to H^1(f_*\mathcal{O}_{\tilde{C}}) \to 0$,
so in particular $g_a(C) + \ell = g(\tilde{C})$, where $g_a(C)$ means the arithmetic genus and $g(\tilde{C})$ is the geometric genus. So $\ell$ is basically "how many extra regular functions" the normalization has.
The claim is that $\ell = 2$. Resolving the cusp introduced $z/x$ to the coordinate ring. I think $z/x$ satisfies a quadratic polynomial (this is true at least locally, you can check that
$$ (1-4z^2) (z/x)^2 + (5z^2 - x^2) = 0,$$
and since the leading coefficient doesn't vanish at the origin, this is as good as a monic polynomial.)
So we've only introduced one more function in this step. Then, the second step introduces the $\tfrac{1}{2}r(r-1) = 1$ additional function to separate the two lines.
