3. Let the function be
$$
f(x)=\left\{\begin{array}{ll}
2^{x}, & x \leqslant 0 ; \\
\left|\log _{2} x\right|, & x>0 .
\end{array}\right.
$$

Then the solution set of the equation $f(x)=\frac{1}{2}$ is $\qquad$
3. $\left\{-1, \frac{\sqrt{2}}{2}, \sqrt{2}\right\}$.

When $x \leqslant 0$, the equation is $2^{x}=\frac{1}{2} \Rightarrow x=-1$;
When $x>0$, the equation is
$\left|\log _{2} x\right|=\frac{1}{2} \Rightarrow \log _{2} x= \pm \frac{1}{2} \Rightarrow x=\sqrt{2}$ or $\frac{\sqrt{2}}{2}$.
Therefore, the solution set of the equation $f(x)=\frac{1}{2}$ is $\left\{-1, \frac{\sqrt{2}}{2}, \sqrt{2}\right\}$.