Solution (source code)

= Solution

For $z\in\mathbb C\setminus[1,\infty)$, the number $w=1-z$ avoids the nonpositive <real axis>. Define the <branch of the complex logarithm> by
$$
\boxed{L(1-z)=\log|1-z|+i\operatorname{Arg}(1-z),\qquad -\pi<\operatorname{Arg}(1-z)<\pi.}
$$
Here the <principal argument> is selected as a <continuous map> on that slit <domain>, so this is a <holomorphic function>, with <derivative> $-1/(1-z)$ and $L(1)=0$. For example, locally writing $w=\rho e^{i\phi}$ gives $d(\log\rho+i\phi)=dw/w$, verifying the <complex derivative>. The normalization also makes this <branch of the complex logarithm> unique: any two continuous choices differ by a constant integer multiple of $2\pi i$ on the <connected> slit <domain>, and their values at $w=1$ agree.

To evaluate the corresponding <analytic branch of a square root> on the <unit circle>, factor
$$
1-e^{i\theta}=e^{i\theta/2}\bigl(e^{-i\theta/2}-e^{i\theta/2}\bigr)=2\sin(\theta/2)e^{i(\theta/2-\pi/2)}.
$$
For $0<\theta<2\pi$, we have $\sin(\theta/2)>0$ and $-\pi/2<\theta/2-\pi/2<\pi/2$. Thus this factorization already uses the selected <principal argument>, with no hidden change by $2\pi$. It follows that
$$
L(1-e^{i\theta})=\log\bigl(2\sin(\theta/2)\bigr)+i(\theta/2-\pi/2).
$$
Halving this expression and applying the <exponential function> gives
$$
\sqrt{1-e^{i\theta}}=\sqrt{2\sin(\theta/2)}\,e^{i\theta/4-i\pi/4}.
$$
Since $\sqrt2e^{-i\pi/4}=1-i$, the desired branch value is
$$
\boxed{\sqrt{1-e^{i\theta}}=(1-i)\sqrt{\sin(\theta/2)}\,e^{i\theta/4},\qquad 0<\theta<2\pi.}
$$
For instance, $\theta=\pi$ gives $\sqrt2>0$, a quick check that the sign agrees with the normalization.