I'm looking for a function $f$ from reals to reals such that $$f(f(x))=x+\lfloor x\rfloor$$ ...or, in other words, a functional square root of the function $x+\lfloor x\rfloor$. I've been able to sketch out some parts of the graph of a function solving this equation, but I'm looking for a nice closed form, not a graph - especially one using the floor function.
NEAR MISS: The function $$g_{a}(x)=(a^2+ 2a)\lfloor x\rfloor +x$$ has functional square root $f_{a}(x)=a\lfloor x\rfloor+ x$, but only as long as $a$ is an integer, so I can't use it on the function I'm asking for.
A somewhat different answer to the amazing @RobertIsrael one: $$f(x)= \cases{x+\frac12 & if $x-\lfloor x\rfloor<\frac12 $\cr x+\lfloor x\rfloor-\frac12 & otherwise}$$