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

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