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

Function f

test/compute-engine/power-combination.test.ts:262–266  ·  view source on GitHub ↗
(theta: Expression)

Source from the content-addressed store, hash-verified

260 // Regression: the power path used to Euler-expand the square while the
261 // base stayed exponential.
262 const sq = engine.expr(['Power', eToTheI('x'), 2]);
263 expect(sq.toString()).toBe('e^(2i * x)');
264 expect(sq.evaluate().toString()).toBe('e^(2i * x)');
265 });
266
267 test('constant angles still reduce', () => {
268 expect(engine.expr(eToTheI(['Divide', 'Pi', 2])).evaluate().toString()).toBe(
269 'i'

Callers 1

Calls 4

eToTheIFunction · 0.85
toStringMethod · 0.65
simplifyMethod · 0.65
exprMethod · 0.65

Tested by

no test coverage detected