integer trunction: use `n % T` instead of `mod(n, T)`.