I want to calculate some intersection products for training my algebra knowledge, but I get stuck with the following example: Take the circle $f=x^2+y^2-1$ and the line $g=y$ on the affine plane $X=\mathbb{A}^2$, I want to calculate the intersection index in the point $(1,0)$. That's where the quotient comes into play. The intersection index in a point $p$ is defined as
$$ \operatorname{mult}(p)=\dim\mathcal{O}_{X,p}/(f,g) $$ with $\mathcal{O}_{X,p}$ the local ring at $p$. In our case we have $$ \mathcal{O}_{\mathbb{A}^2,(a,b)}=\mathbb{C}[x,y]_{(x-a,y-b)}\simeq \mathbb{C}[[x,y]], $$ so in the end, we have $$ \mathcal{O}_{\mathbb{A}^2,(1,0)}/(x^2+y^2-1,y)=\mathbb{C}[[x,y]]/((x+1)^2+y^2-1,y) \\ =\mathbb{C}[[x]]/((x+1)^2-1)=\mathbb{C}[[x]](x(x+2))\simeq\mathbb{C}\times\mathbb{C} $$ so the multiplicity would be $2$, as the dimension of $\mathbb{C}^2$ is $2$, which is clearly wrong as it should be $1$ for the point $(1,0)$ and $1$ for the point $(-1,0)$. Can you help me spot my mistake in the above calculation?
Furthermore if I use a point that is not in the intersection of the zero sets of $f$ and $g$, e.g. $p=(0,0)$, the result is analogously $$ \mathcal{O}_{\mathbb{A}^2,(0,0)}/(x^2+y^2-1,y)=\mathbb{C}[[x]]/((x-1)(x+1))\simeq \mathbb{C}\times\mathbb{C} $$ which cannot be correct as the dimension should be $0$ as there is no intersection.
I really appreciate any help solving my dilemma!