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

Function add

test/compute-engine/solve-diophantine.test.ts:468–471  ·  view source on GitHub ↗
(tr: [number, number, number])

Source from the content-addressed store, hash-verified

466 // triple: |t| ≤ 25, |t₁|,|t₂| ≤ 5. Collect only in-window triples.
467 const gen = new Set<string>();
468 const add = (tr: [number, number, number]) => {
469 if (Math.abs(tr[0]) <= B && Math.abs(tr[1]) <= B && Math.abs(tr[2]) <= B)
470 gen.add(`${tr[0]},${tr[1]},${tr[2]}`);
471 };
472 for (let t = -B; t <= B; t++)
473 for (let t1 = -5; t1 <= 5; t1++)
474 for (let t2 = -5; t2 <= 5; t2++) {

Callers 1

Calls 2

absMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected