8. Given $x \leqslant-\frac{1}{2}$. Then the minimum value of the bivariate function
$$
\begin{array}{l}
f(x, y) \\
=\sqrt{x^{2}+y^{2}}+\sqrt{x^{2}-2 x+2}+\sqrt{y^{2}-2 y+5}
\end{array}
$$

is . $\qquad$
$\begin{array}{l}\text { 8. } \frac{\sqrt{13}+\sqrt{29}}{2} . \\ \text { Let } A(x, 0), B(0, y), C(1,-1), D(2,1) \text {. } \\ \text { Then } f(x, y)=|A B|+|A C|+|B D| \\ \geqslant|A C|+|A D| \\ \geqslant \sqrt{\left(\frac{3}{2}\right)^{2}+1}+\sqrt{\left(\frac{5}{2}\right)^{2}+1} \\ =\frac{1}{2}(\sqrt{13}+\sqrt{29}) \text {. } \\ \text { When } x=-\frac{1}{2}, y=\frac{1}{5} \text {, the equality holds. }\end{array}$