bit.div.div_stepΒΆ

One step of bit-level long division: R[0] ^= N; then if R[:n] >= D[:n], do R -= D and toggle Q[0]. The inner loop of bit.div / bit.idiv.

SignatureΒΆ

def div_step n, N, D, R, Q @ do_sub, end { ... }

Defined in bit/div.fj β€” lines 137–144 (view on GitHub).

ComplexityΒΆ

  • Time: n(10@+20)

  • Space: n(11@+22)

See the complexity glossary for what @, w, dw, dbit, n mean.

SourceΒΆ

Depends onΒΆ


← Previous: bit.div Next: bit.idiv_loop β†’