<s>[INST] why is $2^{\log^{2}\frac{1}{2}} = 1/2$? I have no understanding of $\log^2n$, wouldn't $2^{\log^{2}\frac{1}{2}} = 1/4$ since $2^{\log\frac{1}{2}} = 1/2$?
$\log$ here has the base of $2$.
 [/INST] Using a combination of exponent rules and the one log rule you mentioned,
$$2^{\log^2\frac{1}{2}} = 2^{\log\frac{1}{2} \cdot \log\frac{1}{2}} = (2^{\log\frac{1}{2}})^ {\log\frac{1}{2}} = \left(\frac{1}{2}\right)^{\log\frac{1}{2}}  = \frac{1}{2^{\log\frac{1}{2}}} = \frac{1}{\frac{1}{2}} = 2$$
</s>