As already one user wrote out on Stack Exchange there is a discontinuous function that satisfies the equation $f(f(x)) = -x$. Namely:
Find a real function $f:\mathbb{R}\to\mathbb{R}$ such that $f(f(x)) = -x$?
--> click on the image here to view the function: g(x)
I also know that the function mentioned in that piece is equal to
$$f(x) = g(x-0.5)+0.5$$
Can anyone help me out on this and find the appropriate f(x)?