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

Function pushBound

scripts/fungrim/compile-rules.ts:287–301  ·  view source on GitHub ↗
(
    v: string,
    raw: MathJSON,
    openOp: 'gt' | 'lt',
    closedOp: 'ge' | 'le'
  )

Source from the content-addressed store, hash-verified

285 v: string,
286 raw: MathJSON,
287 openOp: 'gt' | 'lt',
288 closedOp: 'ge' | 'le'
289 ): void => {
290 let bound = raw;
291 let open = false;
292 if (Array.isArray(bound) && bound[0] === 'Open') {
293 open = true;
294 bound = bound[1];
295 }
296 if (isInfiniteBound(bound)) return; // skip infinite bounds
297 guards.push({ k: 'cmp', wc: wc(v), op: open ? openOp : closedOp, bound: W(bound) });
298 };
299
300 // Same, for a part extractor of a variable (Element(Im(z), Interval(a,b)))
301 const pushPartBound = (
302 part: 're' | 'im' | 'abs' | 'arg',
303 v: string,
304 raw: MathJSON,

Callers 1

elementFunction · 0.85

Calls 3

isInfiniteBoundFunction · 0.85
wcFunction · 0.85
WFunction · 0.85

Tested by

no test coverage detected