# On an equality of $x \bmod 1$

Let $x \bmod 1\in \Bbb R$ be fractional part of $x \in \Bbb R$.

For what values of $x \in \Bbb R$ is $x^2 \bmod 1 = (x \bmod 1)^2$? Naturally if $|x| < 1$ we have the equality. However, there are some numbers like $x \in 0.5r \pm \Bbb N$ where $r \in \{0, 1\}$ which satisfy this equality. What is the entire solution set?