Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Base analyzer and multimodular basis provisioner.

The original module tried to “activate only the primes dividing the natural base” and leave the rest idle to save power. That is mathematically unsound: CRT reconstruction needs all channels, so dropping channels makes the result recoverable only modulo a tiny number — useless.

This reframed dispatcher does the two jobs that are actually well-posed:

  1. Exactness / base analysis. Report the natural base (LCM of the radicals of the operands’ denominators) and whether a result is exact in a base. This classifies the answer; it never skips arithmetic.
  2. Basis provisioning. Estimate the result’s bit-height and grow the Basis so the multimodular pipeline has enough primes to CRT + rational-reconstruct without aliasing.

It also exposes the per-value channel validity mask: the channels whose prime divides a value’s denominator are non-integral at that prime and are excluded from that value’s reconstruction. This is correctness bookkeeping for one number — never a global optimization.

Structs§

DispatchPlan
A plan describing the base structure and basis requirements of an operation.
Dispatcher
Analyzes operands and provisions the adaptive basis.