All techniques
Sūtra 4 of 16

Parāvartya Yojayet

Transpose and adjust

Division by numbers slightly above a power of 10, and solving simple equations.

When to use

Dividing by numbers like 12, 13, 112; rearranging algebraic equations.

How it works

For dividing by, say, 12: the 'transposed' digit is −2 (from 10's complement). Bring down digits one by one and multiply the running quotient digit by −2, adding to the next dividend digit.

Memory formula

Transpose the divisor’s extra part as a negative flag, then adjust each next digit.

Worked examples

Problem 1
1234 ÷ 12
0/5

    Modern applications

    Where this ancient technique still lives in today's world.

    Coding

    Polynomial division

    'Transpose and adjust' is exactly synthetic division — used in compilers for constant folding and in DSP for IIR filter design.

    Code in your favourite language

    Synthetic division: transpose the divisor’s tail digits with sign-flipped coefficients.

    Python
    def paravartya(coeffs, divisor_tail):
        out = list(coeffs)
        for i in range(len(out) - len(divisor_tail)):
            for k, t in enumerate(divisor_tail, start=1):
                out[i + k] -= out[i] * t
        q = out[: len(out) - len(divisor_tail)]
        r = out[len(out) - len(divisor_tail):]
        return q, r
    
    print(paravartya([1, 5, 6], [2]))  # ([1, 3], [0])

    Stuck? Ask the tutor.

    Get a personal walkthrough of Parāvartya Yojayet with examples tuned to your question.

    Open AI Tutor