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

Function roots

test/compute-engine/solve.test.ts:722–726  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

720 // R28b regression: inverse trig/hyperbolic functions now numericize to
721 // complex values off their real domain, so the out-of-domain rejection must
722 // happen in the rule guards (it used to fall out of the roots failing to
723 // numericize). The guards also used to miss exact ratios bound as
724 // `NumericValue` instances (`typeof val === 'number'` was false for the
725 // `ExactNumericValue` −2), silently admitting any exact out-of-range ratio.
726 test('should return empty for tanh(x) = 2 (no real solution)', () => {
727 // tanh(x) can only be in (-1, 1)
728 expect(expr('\\tanh(x) = 2').solve('x')).toEqual([]);
729 });

Callers 1

solve.test.tsFile · 0.70

Calls 5

exprFunction · 0.70
mapMethod · 0.65
solveMethod · 0.65
NMethod · 0.65
exprMethod · 0.65

Tested by

no test coverage detected