My analysis TA gave $f: \mathbb{R} \rightarrow \mathbb{R}$ defined as $f(x) = x(-1)^x$ as an example of an open function (i.e. $f$ maps any open set $S$ to some open set $f(S)$) which is not continuous.
I was trying to work through this function with the example $S = (-0.1, 3.1)$. My thought was that $f$ could only be defined when $x \in \mathbb{Z}$ as otherwise the product would include $\sqrt{-1}$, which is undefined in $\mathbb{R}$. For example, $f(\frac{1}{2}) = \frac{\sqrt{-1}}{2}$, which doesn't exist in $\mathbb{R}$ as far as I know. Therefore $f(S) = \{0, -1, 2, -3\}$, which is closed, hence $f$ cannot be open.
My TA said that it's defined everywhere on the reals but is discontinuous at 0, and drew the following graph. My own graph was essentially the "sharp" points without the lines connecting them. This graph seems to imply $f(\frac{1}{2})$ maps to $-\frac{1}{2}$, which would only be the case if the y-axis was imaginary as far as I know, but he reiterated that they're the reals, and conceded that it was "hard to explain".
I haven't worked much with $\mathbb{C}$ or roots of $-1$ before so I'm sure I have some misunderstanding.