Why does this odd glitch exist with graphing programs?

111 Views Asked by At

In Grapher on Mac and the TI-84's built-in graphing program, there is a problem with imaginary numbers. If I input $ i\sqrt {x}$, the graph ends up looking like this, even though it ought to look like $-\sqrt {-x}$. The same problem happens in the TI-84. I decided to test it in Grapher and entered $$ y = \begin{cases} 1, & i = \sqrt{-1}, \\ 2, & i ≠ \sqrt{-1} \end{cases}$$ And it showed y=2. I'm not sure if these are the same bug, but I think they are related. I'm also not sure if the latter bug exists on TI-84. Note: This glitch doesn't seem to occur in Wolfram Alpha EDIT: TI-84's normal calculation does just fine with this stuff, and so does TI-BASIC