Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/abstract/modular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ export function invert(number: bigint, modulo: bigint): bigint {
// prettier-ignore
let x = _0n, y = _1n, u = _1n, v = _0n;
while (a !== _0n) {
// JIT applies optimization if those two lines follow each other
const q = b / a;
const r = b % a;
const r = b - a * q;
const m = x - u * q;
const n = y - v * q;
// prettier-ignore
Expand Down