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

Function realRootValues

benchmarks/runners/run_ce_rubi.mjs:125–134  ·  view source on GitHub ↗
(roots)

Source from the content-addressed store, hash-verified

123 return typeof v.re === 'number' ? v.re : Number(v.toString());
124};
125function realRootValues(roots) {
126 const out = [];
127 for (const r of roots ?? []) {
128 const v = r.N();
129 const re = typeof v.re === 'number' ? v.re : Number(v.toString());
130 const im = typeof v.im === 'number' ? v.im : 0;
131 if (Number.isFinite(re) && Math.abs(im) < 1e-7) out.push(re);
132 }
133 return out;
134}
135const UNEVAL = /^(Limit|Integrate|Sum|Product)$/;
136const isUnevaluated = (r) => UNEVAL.test(r.operator ?? '') || /\b(int|lim|sum)\(/.test(r.toString());
137

Callers 1

runCaseFunction · 0.70

Calls 4

NMethod · 0.65
toStringMethod · 0.65
absMethod · 0.65
isFiniteMethod · 0.45

Tested by

no test coverage detected