Why does $\lim\limits_{x\to2}(-1/2)^x$ not exist

limits

$$\lim\limits_{x\to2}(-1/2)^x=1/4$$
My teacher says this is not correct, and I just can't fathom why this is not correct. I tried to find the value of the given function in the neighbourhood of $$2$$, and I got this

Now I can't understand why my calculator is giving these weird results.
are $$(-1/2)^{1.92}$$ and $$(-1/2)^{192/100}$$ different
and does this limit really not exist?

Let us define the "real-valued" exponential $$f$$ as the partial function given by

$$f(x) = [\text{unique real value among (-1/2)^x = e^{x\log(-1/2)}} ],$$

where $$\log(z) = \log|z| + i(2\pi k + \arg(z))$$ is the multivalued complex logarithm. Now there are several observations:

1. $$f(x)$$ can only possibly defined if $$x$$ is rational.

2. If $$x = p/q$$ is a rational number in lowest terms, then we can prove that the set $$\{e^{(p/q)\log(-1/2)} = (1/2)^{p/q}e^{(2k+1)\pi i p/q} : k \in \mathbb{Z}\}$$ contains exactly one real number if $$q$$ is odd, and no real numbers if $$q$$ is even. Consequently, the domain of $$f$$ is $$\operatorname{dom}(f) = \{ p/q : \text{p, q \in \mathbb{Z} s.t. \gcd(p, q) = 1 and q is odd} \}.$$ This is a dense subset of $$\mathbb{R}$$, so the notion of limit of $$f$$ can be discussed everywhere on $$\mathbb{R}$$.

3. For each $$p/q \in \operatorname{dom}(f)$$ in lowest term, it turns out that $$f(p/q) = (-1)^p (1/2)^{p/q}.$$ For example \begin{align*} f(1.92) &= f(48/25) = (-1)^{48}(1/2)^{48/25} \approx 0.264255, \\ f(1.96) &= f(49/25) = (-1)^{49}(1/2)^{49/25} \approx -0.257028. \end{align*} (Note: If the exponential function is implemented differently in your calculator, the outcome can certainly be different from what $$f(t)$$ evaluates.)

Under this definition, we can show that $$f$$ does not have limit at any point. Indeed, this is because both

$$\{ x \in \operatorname{dom}(f) : f(x) > 0 \} = \{ p/q : \text{p, q \in \mathbb{Z} s.t. \gcd(p, q) = 1 and p is even and q is odd} \}$$

and

$$\{ x \in \operatorname{dom}(f) : f(x) < 0 \} = \{ p/q : \text{p, q \in \mathbb{Z} s.t. \gcd(p, q) = 1 and both p and q are odd} \}$$

are dense subsets of $$\mathbb{R}$$. More precisely, for any $$x \in \mathbb{R}$$,

$$\limsup_{\operatorname{dom}(f) \ni t \to x} f(t) = (1/2)^x \qquad \text{and}\qquad \liminf_{\operatorname{dom}(f) \ni t \to x} f(t) = -(1/2)^{x}.$$

Since limsup and liminf are different, the limit cannot exist. (Of course, the non-existence of limit can also be shown by finding subsequences that tend to different values.)

Remark. Note that the "real-valued" exponential $$f$$ is a "maximal" version. However, if we restrict $$f$$ further onto some dense subset $$D$$, then the restriction $$f|_D$$ can possibly have limits. (I suspect that the calculator OP is using implements the exponential in such a way that $$(-1/2)^x$$ is chosen to be real only on certain subsets of $$\operatorname{dom}(f)$$. In this case, the answer does depend on that particular implementation of the exponential function.)