algorithms/reduce: using floordiv instead of truediv