Is $\frac{x-|x|}{x}$ continuous?

Is $\frac{x-|x|}{x}$ continuous? It should be discontinuous at x=0 as left hand limit and right hand limit at zero are unequal. But it is continuous and the reason given is that they have excluded zero as its domain. Is it possible?

• – Michael Hoppe Dec 29 '16 at 9:30

The function is continuous everywhere where it is defined. Speaking of continuity at $0$ makes no sense since the function is undefined at $0$.
• @user402626 Well, the function is not continuous at $0$. It also isn't discontinuous at $0$. It's not defined at $0$, so talking about continuity at $0$ is like talking about what colour an invisible unicorn is. – 5xum Dec 29 '16 at 8:46
Hint: Let $f(x)=(x-|x|)/x$ for $x \ne 0$. Then
$f(x)=0$ for $x>0$ and $f(x)=2$ for $x<0$
Domain of given function is $x\in \mathbb{R} - \{0\}$