General Reciprocity Law

Theorem

 * $\displaystyle \sum_{0 \mathop \le j \mathop < \alpha n} f \left({\left \lfloor{\dfrac {m j} n}\right \rfloor}\right) = \sum_{0 \mathop \le r \mathop < \alpha m} \left \lceil{\dfrac {r n} m}\right \rceil \left({f \left({r - 1}\right) - f \left({r}\right)}\right) + \left \lceil{\alpha n}\right \rceil f \left({\left \lceil{\alpha m}\right \rceil - 1}\right)$

for $\alpha \in \R$