(4) Let the function $y=f(x)$ satisfy: for all $x \in \mathbf{R}, y=f(x) \geqslant 0$, and $f(x+1)=\sqrt{9-f(x)^{2}}$. When $x \in[0,1)$,
$$
f(x)=\left\{\begin{array}{ll}
2^{x}, & 0 \leqslant x<\frac{1}{2}, \\
\lg (x+31), & \frac{1}{2} \leqslant x<1 .
\end{array}\right.
$$

Then $f(\sqrt{1000})=$ $\qquad$ .
(4) $\frac{3 \sqrt{3}}{2}$ Hint: From the given information,
$$
\begin{array}{c}
f^{2}(x+1)=9-f^{2}(x), \\
f^{2}(x+2)=9-f^{2}(x+1) .
\end{array}
$$

Therefore, $f^{2}(x+2)=f^{2}(x)$.
Since $y=f(x) \geqslant 0$, then $f(x+2)=f(x)$. Thus, $y=f(x)$ is a periodic function with a period of 2. Given $31\frac{1}{2}$, then
$$
f(10 \sqrt{10}-31)=\lg 10 \sqrt{10}=\frac{3}{2},
$$

Therefore,
$$
\begin{aligned}
f(\sqrt{1000}) & =f(10 \sqrt{10}-32) \\
& =\sqrt{9-f^{2}(10 \sqrt{10}-31)} \\
& =\frac{3 \sqrt{3}}{2} .
\end{aligned}
$$