{"_id":"@descix/egpt-math-sdk","_rev":"5-0e511c14004afa9b96e977a75bf10d23","name":"@descix/egpt-math-sdk","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@descix/egpt-math-sdk","version":"0.1.0","keywords":["egpt","wasm","math","sdk","browser","editor"],"author":{"name":"Essam Abadir"},"license":"SEE LICENSE IN LICENSE","_id":"@descix/egpt-math-sdk@0.1.0","maintainers":[{"name":"eabadir","email":"dip@descix.net"}],"homepage":"https://github.com/eabadir/frqtl#readme","bugs":{"url":"https://github.com/eabadir/frqtl/issues"},"dist":{"shasum":"f1525c18cda820a7492af090c9ec2e6270de0490","tarball":"https://registry.npmjs.org/@descix/egpt-math-sdk/-/egpt-math-sdk-0.1.0.tgz","fileCount":114,"integrity":"sha512-/rm3jbtOoNgzwnilOq8uGxiyIIBXup3twHR/vIvJnIBRi9DHAgJ/FI0BchqX32Hn+8n/kR4dHG7u41VN2aZcog==","signatures":[{"sig":"MEQCIFBkh3pFGmZDwHYmpfYps8kS4hnVK7N09D9NSKKV4Fj2AiAhS3lPfOjMSD5c5zORqewe6LMH0IH2z7sYx7t1wN3FkA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":870100},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/egpt-math-sdk.browser.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":"./dist/egpt-math-sdk.browser.js"},"scripts":{"build":"node ./scripts/build.mjs","clean":"node ./scripts/build.mjs --clean-only","serve":"node ./scripts/serve-editor-dev.mjs","prepack":"npm run build && npm run verify:publish-surface","pack:dry-run":"npm pack --dry-run --ignore-scripts","build:wasm-bridge":"wasm-pack build ../../lib/fat/crates/egpt_math_sdk_wasm --target web --out-dir \"$PWD/src/browser/generated/egpt_math_wasm\"","verify:publish-surface":"node ./scripts/verify-publish-surface.mjs"},"_npmUser":{"name":"eabadir","email":"dip@descix.net"},"repository":{"url":"git+https://github.com/eabadir/frqtl.git","type":"git","directory":"sdk/egpt-math-sdk"},"_npmVersion":"11.6.2","description":"WASM-focused EGPT Math SDK package skeleton for browser integration.","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.0"},"_npmOperationalInternal":{"tmp":"tmp/egpt-math-sdk_0.1.0_1783784307036_0.8123992558546647","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@descix/egpt-math-sdk","version":"0.1.1","keywords":["egpt","wasm","math","sdk","browser","editor"],"author":{"name":"Essam Abadir"},"license":"SEE LICENSE IN LICENSE","_id":"@descix/egpt-math-sdk@0.1.1","maintainers":[{"name":"eabadir","email":"dip@descix.net"}],"homepage":"https://github.com/eabadir/fraqtl#readme","bugs":{"url":"https://github.com/eabadir/fraqtl/issues"},"dist":{"shasum":"4b2d48d6bade2531eb63e1e9aadf4bd041fa02b7","tarball":"https://registry.npmjs.org/@descix/egpt-math-sdk/-/egpt-math-sdk-0.1.1.tgz","fileCount":114,"integrity":"sha512-kDTEPYzb4FHiIzjYKmpk4CStMSivvE8em0BhGsGl8G5Q0el4PH1//pMLK1rpui8hJ66hKnYxvFGVRD0PgJwKsw==","signatures":[{"sig":"MEUCIDwi/tEId4bdSrqbLEMpIeO3SXd2dmYr6eQpfLReQjGnAiEA69j4MXR+PEpwX1/DLRXfsSTBjpOhzUeuc92951jDH/w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":863920},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/egpt-math-sdk.browser.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":"./dist/egpt-math-sdk.browser.js"},"gitHead":"848cf507d66d209083fc858d8fdf6beef1c368bd","scripts":{"build":"node ./scripts/build.mjs","clean":"node ./scripts/build.mjs --clean-only","serve":"node ./scripts/serve-editor-dev.mjs","prepack":"npm run build && npm run verify:publish-surface","pack:dry-run":"npm pack --dry-run --ignore-scripts","build:wasm-bridge":"wasm-pack build ../../lib/fat/crates/egpt_math_sdk_wasm --target web --out-dir \"$PWD/src/browser/generated/egpt_math_wasm\"","verify:publish-surface":"node ./scripts/verify-publish-surface.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7913f1d2-f8dd-4387-b6d1-48a7fff32f2e"}},"repository":{"url":"git+https://github.com/eabadir/fraqtl.git","type":"git","directory":"sdk/egpt-math-sdk"},"_npmVersion":"11.18.0","description":"WASM-focused EGPT Math SDK package skeleton for browser integration.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.0"},"_npmOperationalInternal":{"tmp":"tmp/egpt-math-sdk_0.1.1_1783886494677_0.8276498319423016","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@descix/egpt-math-sdk","version":"0.1.2","keywords":["egpt","wasm","math","sdk","browser","editor"],"author":{"name":"Essam Abadir"},"license":"SEE LICENSE IN LICENSE","_id":"@descix/egpt-math-sdk@0.1.2","maintainers":[{"name":"eabadir","email":"dip@descix.net"}],"homepage":"https://github.com/eabadir/fraqtl#readme","bugs":{"url":"https://github.com/eabadir/fraqtl/issues"},"bin":{"egpt-math-bench":"dist/node/bin/egpt-math-bench.js"},"dist":{"shasum":"c931b9417baa29a3bd7349a625a603d3efaf0e38","tarball":"https://registry.npmjs.org/@descix/egpt-math-sdk/-/egpt-math-sdk-0.1.2.tgz","fileCount":116,"integrity":"sha512-Wwfm76mHrWudd6jkRnE1Cc0oYpFkVnfDeXBzE4RfqegjSlaSxDb7XtD/XqNAAlkdMP2cFeqJbXLPz93mDvPW8A==","signatures":[{"sig":"MEUCIQCctBS4gBXhiIONgQtv2UFubWTPFSWcfDu9iKaCZZEsZQIgRBoU32HSnI6LjipCFqMwNFPwDGwnbgR/wDuZ2HRlidY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":950038},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/egpt-math-sdk.browser.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":"./dist/egpt-math-sdk.browser.js"},"gitHead":"f24d8d9bafb1466561459e6ccb6dc751f5dfe48d","scripts":{"build":"node ./scripts/build.mjs","clean":"node ./scripts/build.mjs --clean-only","serve":"node ./scripts/serve-editor-dev.mjs","prepack":"npm run build && npm run verify:publish-surface","pack:dry-run":"npm pack --dry-run --ignore-scripts","build:wasm-bridge":"wasm-pack build ../../lib/fat/crates/egpt_math_sdk_wasm --target web --out-dir \"$PWD/src/browser/generated/egpt_math_wasm\"","verify:publish-surface":"node ./scripts/verify-publish-surface.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7913f1d2-f8dd-4387-b6d1-48a7fff32f2e"}},"repository":{"url":"git+https://github.com/eabadir/fraqtl.git","type":"git","directory":"sdk/egpt-math-sdk"},"_npmVersion":"11.18.0","description":"WASM-focused EGPT Math SDK package skeleton for browser integration.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.0"},"_npmOperationalInternal":{"tmp":"tmp/egpt-math-sdk_0.1.2_1784235728367_0.0827587515468593","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@descix/egpt-math-sdk","version":"0.1.3","keywords":["egpt","wasm","math","sdk","browser","editor"],"author":{"name":"Essam Abadir"},"license":"SEE LICENSE IN LICENSE","_id":"@descix/egpt-math-sdk@0.1.3","maintainers":[{"name":"eabadir","email":"dip@descix.net"}],"homepage":"https://github.com/eabadir/fraqtl#readme","bugs":{"url":"https://github.com/eabadir/fraqtl/issues"},"bin":{"egpt-math-bench":"dist/node/bin/egpt-math-bench.js"},"dist":{"shasum":"a2a783b6d82379554b21e1f5dddb94a0f192df29","tarball":"https://registry.npmjs.org/@descix/egpt-math-sdk/-/egpt-math-sdk-0.1.3.tgz","fileCount":117,"integrity":"sha512-X2HAxlGnfa25esJJPpk1heugs4/c6NhiUJuNX1RJ1mliLC1fdRdjPNB32PCKnrH+lAySbdtsg/5ti3MTNxOM5A==","signatures":[{"sig":"MEUCICGwft5hKCZf/i5l4JCqLZHOHsyC8O2w1bD6Kx5DEd+WAiEAu1SF2Du9fTDOOpeqDc9vxF4hNbE+dLChJ27YsRNgRcQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1013506},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/egpt-math-sdk.browser.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":"./dist/egpt-math-sdk.browser.js"},"gitHead":"cff102a3805dadd21ba363a0ecbdea1825199bb1","scripts":{"build":"node ./scripts/build.mjs","clean":"node ./scripts/build.mjs --clean-only","serve":"node ./scripts/serve-editor-dev.mjs","prepack":"npm run build && npm run verify:publish-surface","pack:dry-run":"npm pack --dry-run --ignore-scripts","build:wasm-bridge":"wasm-pack build ../../lib/fat/crates/egpt_math_sdk_wasm --target web --out-dir \"$PWD/src/browser/generated/egpt_math_wasm\"","verify:publish-surface":"node ./scripts/verify-publish-surface.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0592d8da-dc99-4811-8ed6-2d124cd57c1c"}},"repository":{"url":"git+https://github.com/eabadir/fraqtl.git","type":"git","directory":"sdk/egpt-math-sdk"},"_npmVersion":"11.19.1","description":"WASM-focused EGPT Math SDK package skeleton for browser integration.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.0"},"_npmOperationalInternal":{"tmp":"tmp/egpt-math-sdk_0.1.3_1787840289056_0.044673928870563095","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@descix/egpt-math-sdk@0.2.0","bin":{"egpt-math-bench":"dist/node/bin/egpt-math-bench.js"},"bugs":{"url":"https://github.com/eabadir/fraqtl/issues"},"dist":{"shasum":"3f69adc905d1ac0c2d0671468a68c57987f46108","tarball":"https://registry.npmjs.org/@descix/egpt-math-sdk/-/egpt-math-sdk-0.2.0.tgz","fileCount":117,"integrity":"sha512-cIK+bCglzT7MuRBdslWpCmklc0VmAZ2MDBARE2xFQ76lX1UMlVt0aGtdyJh7xdHl/rEoRwJhTIQwBK63CECpSQ==","signatures":[{"sig":"MEUCIQDjQN2qbPLh2I97KZF/H3sqnJpkkQX+dkLaXItDxm6vFgIgMcNTIx3XNmc9Cb1fsT3veGIutssvMur7aK+66yB7TC8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCMXhnL/f35IStACxEpBPgrz+I/vcZ1pfTV5m9iuMnc7AIhAMSELHyyZl+iGE1Rh5/XVJXWhGQkv3dT6Ki1fLagcW9x"}],"unpackedSize":1019060},"main":"./dist/index.js","name":"@descix/egpt-math-sdk","type":"module","types":"./dist/index.d.ts","author":{"name":"Essam Abadir"},"module":"./dist/index.js","browser":"./dist/egpt-math-sdk.browser.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":"./dist/egpt-math-sdk.browser.js"},"gitHead":"9588d86f9bf00c05377c7806a5a0eb5bf270bce8","license":"SEE LICENSE IN LICENSE","scripts":{"build":"node ./scripts/build.mjs","clean":"node ./scripts/build.mjs --clean-only","serve":"node ./scripts/serve-editor-dev.mjs","prepack":"npm run build && npm run verify:publish-surface","pack:dry-run":"npm pack --dry-run --ignore-scripts","build:wasm-bridge":"wasm-pack build ../../lib/fat/crates/egpt_math_sdk_wasm --target web --out-dir \"$PWD/src/browser/generated/egpt_math_wasm\"","verify:publish-surface":"node ./scripts/verify-publish-surface.mjs"},"version":"0.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0592d8da-dc99-4811-8ed6-2d124cd57c1c"}},"homepage":"https://github.com/eabadir/fraqtl#readme","keywords":["egpt","wasm","math","sdk","browser","editor"],"repository":{"url":"git+https://github.com/eabadir/fraqtl.git","type":"git","directory":"sdk/egpt-math-sdk"},"_npmVersion":"11.20.0","description":"Exact real and transcendental arithmetic built from integers (EGPTReal, EGPTranscendental), compiled Rust → WASM for the browser and Node.","directories":{},"maintainers":[{"name":"eabadir","email":"dip@descix.net"}],"sideEffects":false,"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/egpt-math-sdk_0.2.0_1790624420057_0.028468629963128933"}}},"time":{"created":"2026-07-11T15:38:26.934Z","modified":"2026-09-28T19:40:20.345Z","0.1.0":"2026-07-11T15:38:27.238Z","0.1.1":"2026-07-12T20:01:34.865Z","0.1.2":"2026-07-16T21:02:08.515Z","0.1.3":"2026-08-27T14:18:09.214Z","0.2.0":"2026-09-28T19:40:20.178Z"},"bugs":{"url":"https://github.com/eabadir/fraqtl/issues"},"author":{"name":"Essam Abadir"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/eabadir/fraqtl#readme","keywords":["egpt","wasm","math","sdk","browser","editor"],"repository":{"url":"git+https://github.com/eabadir/fraqtl.git","type":"git","directory":"sdk/egpt-math-sdk"},"description":"Exact real and transcendental arithmetic built from integers (EGPTReal, EGPTranscendental), compiled Rust → WASM for the browser and Node.","maintainers":[{"name":"eabadir","email":"dip@descix.net"}],"readme":"# @descix/egpt-math-sdk\n\n**EGPT Math SDK — browser-first exact real and transcendental arithmetic, built from integers**\n\nProvides the EGPT Math engine as a pluggable browser package: an exact arithmetic\ncore over constructive reals — `EGPTReal` and `EGPTranscendental` values built from\ninteger arithmetic, of which rationals are the trivial case (backed by the\n`egpt_math_sdk_wasm` Rust/WASM crate) — behind a stable `MathBackendProvider`\ninterface that lets you swap implementations without touching calling code.\n\n## What is this\n\nEGPT Math replaces the standard floating-point math kernel with **exact real and\ntranscendental arithmetic over prime-indexed information atoms, constructed from\nintegers**. `EGPTReal.fromRational(1n, 2n).exp2()` is `(1/2) * H(2)` — √2 held exactly,\nand squaring it returns exactly `2`; `log2(8)` is exactly `3`. Operations like matrix\nmultiplication, polynomial evaluation, and order-finding in quantum simulation run on\nthese exact values instead of approximations — producing provably correct intermediate\nresults that track the EGPT compression chain.\n\nThis SDK package publishes the browser-runnable surface. The full EGPT math theory,\nLean proof chains (P=NP capstone, bijection chain), and canonical dev core live in the\nFRAQTL monorepo (`lib/egpt/`).\n\n## Installation\n\n```\nnpm install @descix/egpt-math-sdk\n```\n\n## Browser Usage\n\n```js\nimport { createEgptMathSdk } from \"@descix/egpt-math-sdk\";\n\nconst sdk = await createEgptMathSdk({\n  wasmUrl: new URL(\"./wasm/egpt_math_sdk_wasm_bg.wasm\", import.meta.url).toString(),\n  wasmModuleUrl: new URL(\"./wasm/egpt_math_sdk_wasm.js\", import.meta.url).toString()\n});\n\n// Derived badge — never hardcoded (truth-in-labeling). Always \"wasm-math\" in\n// this package: createEgptMathSdk() throws rather than returning an SDK for\n// any other outcome (see §Publish surface below).\nconsole.log(\"Backend:\", sdk.activeMathBackend);  // \"wasm-math\"\n\n// Exact arithmetic (rationals are the trivial case) — real Rust/WASM compute, no JS math core in this bundle.\nconst a = sdk.EGPTReal.fromRational(3n, 4n);\nconst b = sdk.EGPTReal.fromRational(1n, 2n);\nconst sum = sdk.EGPTMath.add(a, b);\nconsole.log(sum.toMathString());  // \"5/4\"\n\n// Matrix multiply, routed through the polynomial bijective chain.\nconst A = sdk.EGPTMatrix.from([[1n, 2n], [3n, 4n]]);\nconst B = sdk.EGPTMatrix.from([[5n, 6n], [7n, 8n]]);\nconsole.log(sdk.EGPTMatrix.format(sdk.EGPTMatrix.matMul(A, B), \"A x B\"));\n```\n\n## Verify it yourself — `egpt-math-bench`\n\nRun the canonical assertion bench COLD from the published package — no clone, no build:\n\n```\nnpx -y -p @descix/egpt-math-sdk egpt-math-bench\n```\n\nIt loads this package's own WASM surface (`dist/wasm/`) and drives the 157 canonical\nEGPT-Math assertions against it — real Rust/WASM arithmetic, never a JS math core. It\nprints a deterministic, machine-checkable summary line and exits `0` iff every runnable\nassertion passes:\n\n```\nEGPT-MATH BENCH: 157 canonical assertions | 157 runnable | 157/157 pass | 0 structurally-gapped (pinned) → RESULT: PASS\n```\n\nAs of the scaled-vector op-contract expansion (ws-egpt-math-rust-ops, 2026-07-16) ALL 157\ncanonical assertions are RUNNABLE against the WASM facade — **zero structurally-gapped**.\nThe scaled-vector `ArenaVal` keystone (irrational `{scalar, base}` vectors, from_scaled_vector\nreduction), facade in-place scalar mutation, `toPPF`/`toMathString`, and the shared\nphase/composed factories ported the former 52 gaps. Pass `--quiet` to suppress the (now\nempty) per-gap listing.\n\n## Publish surface — WASM-only (CEO standing rule, 2026-07-10)\n\n**No JS math-core source ships in `dist/`.** `dist/index.js` is built from\n`src/browser/dist-entry.js` (NOT `src/browser/sdk-entry.js`, which remains the\nDEV source entry used by the local IDE at `/egpt-src/index.js` and is\nunaffected by this rule). Every arithmetic op in the published package is a\ndispatch through the `WasmMathBackendProvider` (real Rust/WASM), never JS\nBigInt PPF math — `scripts/verify-publish-surface.mjs` asserts this on every\nbuild (probes the built bundle for symbols unique to the concrete\n`lib/egpt/js/model/core/*` implementation, plus a size ceiling; wired into\n`make verify-publish-surface` at the repo root, which also gates\n`@descix/frqtl-sdk`'s equivalent rule for the physics engine).\n\n<!-- PUBLISH-SURFACE:SHIPPED:BEGIN — generated from the BUILT dist; bound by\n     scripts/test/math-sdk-doc-surface.test.mjs (regenerate: node scripts/dist-surface.mjs) -->\n**Shipped (every top-level name `createEgptMathSdk()` returns):** `ComplexEGPTReal`, `EGPTComplex`, `EGPTFFT`, `EGPTMath`, `EGPTMatrix`, `EGPTPolynomial`, `EGPTReal`, `EGPTStat`, `EGPTStatData`, `EGPTdsp`, `EGPTranscendental`, `FraqtlSession`, `TwiddleTable`, `activeMathBackend`, `benchmarks`, `createFraqtlSession`, `factorizeWithLogRoot`, `mathBackendProvider`, `metadata`, `presetOptions`, `wasm`.\n<!-- PUBLISH-SURFACE:SHIPPED:END -->\n\nMeasured, not declared: `scripts/dist-surface.mjs` creates the SDK from the built artifact and\nreports what it answers to; the conformance test above fails if this paragraph and the dist\ndisagree in either direction. `EGPTMatrix`/`EGPTFFT`/`EGPTStat`/`EGPTComplex`/`TwiddleTable`/\n`EGPTranscendental` are WASM-faced — every arithmetic op routes through the 37-op provider, and\n`egpt-math-bench` runs 157/157 canonical assertions against this dist with zero gaps.\n\n<!-- PUBLISH-SURFACE:ABSENT:BEGIN — same gate, the other direction -->\n**NOT on this dist** (available in DEV via `sdk-entry.js` / `/egpt-src/`): `codec`, `OrderFinder`, `PrimeAtomPolynomial`, `EGPTPrimeComposite`, `Multilinear`, `matMul`, `polyGCD`, `monicNormalize`, `EGPTMatrix.toValueReps`, `EGPTMatrix.fromValueReps`, `EGPTPolynomial.degree`, `EGPTPolynomial.equals`, `EGPTPolynomial.subtract`, `EGPTPolynomial.trimZeros`.\n<!-- PUBLISH-SURFACE:ABSENT:END -->\n\nEach is structurally coupled to the concrete js-reference classes, so facing it against the WASM\nprovider is real work, not a re-export. `EGPTMatrix.toValueReps`/`.fromValueReps` are point-absent\nfor a sharper reason: the correct op (`EGPTPolynomial.toValueRepresentation`/\n`fromValueRepresentation` — evaluation at canonical base nodes 2^0..2^D + Newton-DD inversion)\nis not in the 37-op contract, and substituting a near-miss would silently compute the wrong\nnumber — omission with a loud error beats a silent wrong answer.\n\n**Editor harness excluded.** The interactive playground previously shipped at\n`dist/editor/` (a live exerciser of the FULL class surface, including the\nexcluded classes above) is excluded from this dist entirely — it remains\navailable in DEV via `/egpt-src/editor/`.\n\n**Notebooks (`dist/notebooks/`) ship as data, not code**, so their presence\ndoesn't itself violate the no-core-source rule — but a subset of them\nreference names this dist does not expose and would throw at cell-run time\n(FAIL LOUD, never a silently wrong answer). WHICH subset is DERIVED, never\nlisted here: `scripts/dist-surface.mjs` loads the built dist and reports the\nnames it exposes, and the repo's `scripts/notebook-runnability.mjs` compares\nthat surface against the names each notebook's cells actually use. The static\nsite bundle ships only the runnable ones (`scripts/assemble-static-deploy.mjs`\nprints every exclusion with the names that caused it). A hand list here would\ndrift from the dist the moment a name lands.\n\n## The `MathBackendProvider` contract (BYO #4 — internal, M5)\n\n**`MathBackendRegistry` is NOT exported by `@descix/egpt-math-sdk`** — not from\nthis package's published `dist/` (§Publish surface above: the dist-only\nentry, `dist-entry.js`, has exactly one backend and never registers a second\none) and not from the DEV source entry either (`sdk-entry.js` imports\n`MathBackendRegistry` for its own internal use but does not re-export it).\nDo not `import { MathBackendRegistry } from \"@descix/egpt-math-sdk\"` — that\nimport throws (no such export). The registry is monorepo-internal:\n\n```js\n// FRAQTL monorepo development ONLY — not a published package import.\nimport { MathBackendRegistry } from \"lib/egpt/js/model/backend/MathBackendProvider.js\";\n\n// Register a custom backend\nMathBackendRegistry.register({\n  id: \"my-backend\",\n  fromBigInt: (n) => /* ... */,\n  add: (a, b) => /* ... */,\n  // ... full 37-op surface (see lib/egpt/js/model/backend/README.md)\n});\n\nMathBackendRegistry.select(\"my-backend\");\n// All SDK codec chains and the order-finding QFT loop now execute on your backend.\n```\n\nThe contract is defined at `lib/egpt/js/model/backend/README.md` in the FRAQTL\nrepository. Status: **INTERNAL** — published only after M5 (V2 transport) proves\nthe dispatch path with honest performance numbers, and the registry itself is\nexposed on a public entry (it is not, as of this Bite).\n\n## Packaging policy\n\nPublished payload is `dist/` and this `README.md` only (`package.json#files`).\nSource trees (`src/`, `scripts/`, Rust crates) are not published.\n\nVerification:\n```bash\nnpm run build\nnpm run verify:publish-surface\nnpm run pack:dry-run\n```\n\n## CHANGES (M5)\n\n**M5.2 — V2 binary transport (2026-06-11)**\n\nThe integer hot-loop ops (`modPow`, `gcd`, `lcm`) now use Uint8Array binary limb\ntransport (`[sign_byte, ...le_magnitude_bytes]`) instead of string marshaling.\nNo SharedArrayBuffer — plain ArrayBuffer copies (no COOP/COEP headers required).\nBuilds on the `egpt_math_sdk_wasm` crate V2 exports: `mod_pow_v2`, `gcd_v2`, `lcm_v2`.\n\nHonest performance (M2 Pro, 100 × modPow(2..101, N-1, N), N=39-bit semiprime):\n- js-reference:  0.47 ms\n- wasm-math V1 (string):  1.76 ms (3.77x)\n- wasm-math V2 (binary): 2.06 ms (4.42x)\n- V2 vs V1 ratio: 1.17x (V2 is slightly slower due to WASM call boundary overhead\n  — string parsing was not the dominant cost; boundary crossing is)\n\nThis confirms: the remaining overhead vs js-reference is WASM call boundary cost,\nnot serialization format. A future bulk-operation batching approach would be the next\nmeaningful step.\n\n**M5.1 — Handle-model upgrade (2026-06-11)**\n\nCodec transforms that call EGPTReal instance-method ops (`.toPrimeAtoms()`,\n`.toAtomRoot()`, `.fromAtomVec()`, `.fromAtomRoot()`, `breakSymbolic*`) now route\nthrough `MathBackendRegistry.active()` via a single dispatch shim\n(`lib/egpt/js/model/backend/handleDispatch.js`). Codec chains running under the\nwasm-math backend now genuinely execute those ops through WASM. 50/50 parity fixtures\npass (46 original + 4 new instance-op fixtures).\n\n## Architect publication recommendation (M5)\n\n**Hold — do not publish as BYO #4 yet.**\n\nGrounds: V2 binary transport shows the WASM overhead is dominated by call boundary\ncrossing (4.4x vs js-reference), not serialization. The advertised benefit of the BYO\ncontract is that third-party backends execute faster or differently than js-reference;\nat 4.4x overhead, an integrator's first experience would be a slowdown. The contract\ndesign is clean and correct (50/50 parity, FAIL-LOUD throughout); the value proposition\nneeds bulk-operation batching or a demonstration workload where WASM compute savings\ndominate boundary cost. Recommendation: ship internally as M5, revisit publish after a\nbatching benchmark demonstrates net positive throughput.\n\nCEO/EVP decision required before publication.\n\n## In-browser code editor scaffold — REMOVED from this dist (2026-07-10)\n\nThe interactive editor scaffold (`dist/editor/index.html` + examples +\ntheorem demos + tests) previously published here has been excluded from the\npublish surface — see §Publish surface above. It remains available for local\ndevelopment at `/egpt-src/editor/` (served by `lib/server/mounts.js` off\n`sdk/egpt-math-sdk/src/editor/`).\n\n## Local Development\n\n```bash\n# Build WASM bridge (requires wasm-pack + Rust toolchain)\nnpm run build:wasm-bridge\n\n# Build SDK dist\nnpm run build\n\n# Run parity suite (requires built WASM)\nnode --test lib/egpt/js/model/backend/test/parity.test.mjs\n\n# V1 vs V2 transport timing\nnode sdk/egpt-math-sdk/src/browser/n39-timing.mjs\n```\n","readmeFilename":"README.md"}