f n ( x ) = { x − 1 n ⌊ n x ⌋ if ⌊ n x ⌋ ≡ 0 mod 2 1 n ⌊ n x ⌋ − x + 1 n if ⌊ n x ⌋ ≡ 1 mod 2 {\displaystyle f_{n}(x)=\left\{{\begin{array}{ll}x-{\frac {1}{n}}\lfloor nx\rfloor &{\text{ if }}\lfloor nx\rfloor \equiv 0{\bmod {2}}\\{\frac {1}{n}}\lfloor nx\rfloor -x+{\frac {1}{n}}&{\text{ if }}\lfloor nx\rfloor \equiv 1{\bmod {2}}\end{array}}\right.}