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

Function pellMul

test/compute-engine/diophantine.test.ts:367–373  ·  view source on GitHub ↗

`(x1,y1)·(x2,y2)` in `ℤ[√D]`.

(
  [x1, y1]: [bigint, bigint],
  [x2, y2]: [bigint, bigint],
  D: bigint
)

Source from the content-addressed store, hash-verified

365
366/** `(x1,y1)·(x2,y2)` in `ℤ[√D]`. */
367function pellMul(
368 [x1, y1]: [bigint, bigint],
369 [x2, y2]: [bigint, bigint],
370 D: bigint
371): [bigint, bigint] {
372 return [x1 * x2 + D * y1 * y2, x1 * y2 + y1 * x2];
373}
374
375function pairKey([x, y]: [bigint, bigint]): string {
376 return `${x},${y}`;

Callers 1

pellFamilyMembersInBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected