\[s(h,k)=\sum_{r=1}^{k-1}\frac{r}{k}\left(\frac{hr}{k}-\left\lfloor\frac{hr}{k}%
\right\rfloor-\frac{1}{2}\right).\]