MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / A

Function A

src/compute-engine/library/number-theory.ts:983–988  ·  view source on GitHub ↗
(n: bigint, k: bigint)

Source from the content-addressed store, hash-verified

981 const a0 = toBigint(aOp);
982 const n = toBigint(nOp);
983 if (a0 === null || n === null || n < 1n) return undefined;
984 if (n === 1n) return ce.number(1);
985 const a = ((a0 % n) + n) % n;
986 if (gcd(a, n) !== 1n) return undefined;
987 // The order divides λ(n); the smallest such divisor is the order.
988 for (const d of divisorsAscending(
989 carmichaelLambda(n, ce._deadlineFrame),
990 ce._deadlineFrame
991 )) {

Callers 1

number-theory.tsFile · 0.85

Calls 1

checkDeadlineFunction · 0.90

Tested by

no test coverage detected