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

Function shouldNumericize

src/compute-engine/boxed-expression/apply.ts:82–88  ·  view source on GitHub ↗
(
  numericApproximation: boolean | undefined,
  ...ops: ReadonlyArray<Expression | undefined | null>
)

Source from the content-addressed store, hash-verified

80 * non-number-literal expressions — see `isExactNumber`) do not trigger this
81 * on their own; call sites should still run their own exact-value
82 * reductions (poles, `f(0)`, …) before consulting this.
83 *
84 * Mixing exact and inexact operands numericizes the whole call (float
85 * contagion), matching `Add`/`Multiply`'s numeric-literal folding.
86 */
87export function shouldNumericize(
88 numericApproximation: boolean | undefined,
89 ...ops: ReadonlyArray<Expression | undefined | null>
90): boolean {
91 if (numericApproximation) return true;

Callers 6

complex.tsFile · 0.90
distributions.tsFile · 0.90
trigonometry.tsFile · 0.90
statistics.tsFile · 0.90
arithmetic.tsFile · 0.90

Calls 1

isExactNumberFunction · 0.85

Tested by

no test coverage detected