/* Set b=b mod c */ public void mod(FF c) { int k = 0; norm(); if (comp(this, c) < 0) { return; } do { c.shl(); k++; } while (comp(this, c) >= 0); while (k > 0) { c.shr(); if (comp(this, c) >= 0) { sub(c); norm(); } k--; } }