I'm reading A First Course in Modular Forms. Using formulas of the book, I compute that the genus of $X_0(10)=X(\Gamma_0(10))=-1/2$. The computation as follows.
$$d_{10}=\frac1210^3\left(1-\frac1{2^2}\right)\left(1-\frac1{5^2}\right)=360\ (\text{c.f. Page 106}),$$
$$d=\frac{2d_{10}}{10\,\phi(10)}=18\ (\text{c.f. Page 107}),$$
$$\varepsilon_2=4,\ \varepsilon_3=0,\ \varepsilon_\infty=4\ (\text{c.f. Page 107}),$$
thus $g=1+\frac d{12}-\frac{\varepsilon_2}4-\frac{\varepsilon_3}3-\frac{\varepsilon_\infty}2=-\frac12$. It's unreasonable to get a negative fractional genus, but I can't see where I go wrong. Any comments is appreciated:)
The error is in your calculation of $\varepsilon_2$, which is $2$, not $4$. See Corollary 3.7.2 of Diamond & Shurman (on page 96), and note that the notation $(-1/p)$ used there is not quite the standard Legendre symbol: rather, $(-1/p)$ is defined to be $\pm 1$ if $p \equiv \pm 1 \pmod{4}$, and to be zero if $p = 2$. Thus, $$\varepsilon_2(\Gamma_0(10)) = (1 + 0) \cdot (1 + 1) = 2.$$