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

Function isExactNumber

src/compute-engine/boxed-expression/apply.ts:59–63  ·  view source on GitHub ↗
(x: Expression)

Source from the content-addressed store, hash-verified

57 * Eisenstein series at τ = i) are preserved. A non-Gaussian complex float
58 * (`1.5+2i`) still numericizes — it never was representable exactly.
59 *
60 * Non-number-literal expressions (symbols like `Pi`, unevaluated functions)
61 * are treated as exact here: they have no float to lose, and any exact
62 * reduction for them is the caller's job, not this predicate's.
63 */
64export function isExactNumber(x: Expression): boolean {
65 if (!isNumber(x)) return true;
66 if (x.isExact) return true;

Callers 2

arithmetic.tsFile · 0.90
shouldNumericizeFunction · 0.85

Calls 2

isNumberFunction · 0.90
isIntegerMethod · 0.45

Tested by

no test coverage detected