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

Function simplifiesTo

test/compute-engine/fungrim-loader.test.ts:778–784  ·  view source on GitHub ↗
(input: unknown, expected: unknown)

Source from the content-addressed store, hash-verified

776 expect(r.some((v) => Math.abs(v - -0.11183255915896297) < 1e-9)).toBe(true); // W₀(−1/10)
777 expect(r.some((v) => Math.abs(v - -3.577152063957297) < 1e-9)).toBe(true); // W₋₁(−1/10)
778 for (const v of r) expect(v * Math.exp(v)).toBeCloseTo(-0.1, 9);
779 });
780
781 it('Arctan: arctan(x) = 0.5 → tan(0.5) [fungrim:1f026d:solve]', () => {
782 const r = solved('\\arctan(x) = 0.5');
783 expect(r.length).toBe(1);
784 expect(r[0]).toBeCloseTo(Math.tan(0.5), 10);
785 });
786
787 it('Tan: tan(x) = 2 → arctan(2) [fungrim:f516e3:solve]', () => {

Callers 1

Calls 4

simplifyMethod · 0.65
exprMethod · 0.65
isSameMethod · 0.65
isEqualMethod · 0.65

Tested by

no test coverage detected