Groups
Category
A vector is an element you can add and scale, and a vector space is any collection of such elements closed under these operations.
The floor sum computes S(n,m,a,b) = sum_{i=0}^{n-1} floor((a i + b)/m) efficiently in O(log(min(a,m))) time.