A symmetric remainder division rule that eliminates CPU modulo and allows branchless correction. Is this formulation known in algorithmic number theory?

I am exploring a variant of integer division where the remainder is chosen from a symmetric interval rather than the classical [0, B) range.

Formally, for integers T and B, instead of T = Q·B + R with 0 ≤ R < B, I use: T = Q·B + R with B/2 < R ≤ +B/2,

and Q is chosen such that |R| is minimized. This produces a signed correction term and eliminates the need for % because the correction step is purely additive and branchless.

From a CS perspective this behaves very differently from classical modulo:

modulo operations vanish completely

SIMD-friendly implementation (lane-independent)

cryptographic polynomial addition becomes ~6× faster on ARM NEON

no impact on workloads without modulo (ARX, ChaCha20, etc.)

My question: Is this symmetric-remainder division already formalized in algorithmic number theory or computer arithmetic literature? And is there a known name for the version where the quotient is chosen to minimize |R|?

I am aware of “balanced modulo,” but that operation does not adjust the quotient. Here the quotient is part of the minimization step.

If useful, I can provide benchmarks and a minimal implementation.

Posted Dec 5, 2025, 3:25 PM UTC

523
Loading comments…