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

Function evaluate

test/compute-engine/calculus.test.ts:3–5  ·  view source on GitHub ↗
(expr: string)

Source from the content-addressed store, hash-verified

1import { engine } from '../utils';
2import { ComputeEngine } from '../../src/compute-engine';
3
4function evaluate(expr: string): string {
5 return engine.parse(expr).evaluate().toString();
6}
7function N(expr: string): number {
8 const result = engine.parse(expr).N();

Callers 1

calculus.test.tsFile · 0.70

Calls 3

toStringMethod · 0.65
evaluateMethod · 0.65
parseMethod · 0.65

Tested by

no test coverage detected