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

Function parity

test/compute-engine/compile.test.ts:802–808  ·  view source on GitHub ↗
(src: any, vars: Record<string, number>, digits = 10)

Source from the content-addressed store, hash-verified

800 });
801 }
802 });
803});
804
805// REVIEW.md E1: Range with symbolic bounds compiled to
806// `Array.from({length: NaN})` because the guard tested `parseFloat(...) !==
807// null`, but parseFloat returns NaN (never null) for symbolic bounds — so the
808// constant-length branch always won and every symbolic Range yielded `[]`.
809describe('COMPILE Range with symbolic bounds (E1)', () => {
810 it('Range(1, n) emits a runtime length, not NaN', () => {
811 const code = compile(ce.expr(['Range', 1, 'n']))!.code;

Callers 1

compile.test.tsFile · 0.85

Calls 4

compileFunction · 0.90
boxMethod · 0.65
NMethod · 0.65
subsMethod · 0.65

Tested by

no test coverage detected