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

Function trigSign

src/compute-engine/boxed-expression/trigonometry.ts:657–674  ·  view source on GitHub ↗
(operator: string, x: Expression)

Source from the content-addressed store, hash-verified

655 // specialValues of inv_operator function
656 //
657 type ConstructibleTrigValuesInverse = [
658 [match_arg: Expression, match_arg_N: number],
659 angle: [numerator: number, denominator: number],
660 ][];
661 const specialInverseValues = ce._cache<ConstructibleTrigValuesInverse>(
662 'constructible-inverse-trigonometric-values-' + operator,
663 () => {
664 const cache: ConstructibleTrigValuesInverse = [];
665 for (const [[n, d], value] of specialValues) {
666 const r = value[inv_operator!];
667 if (r === undefined) continue;
668 const rn = r.N().re;
669 if (Number.isNaN(rn)) continue;
670 cache.push([
671 [r, rn],
672 [n, d],
673 ]);
674 }
675 return cache;
676 },
677

Callers 2

trigonometry.tsFile · 0.90
trigFunctionFunction · 0.90

Calls 1

quadrantFunction · 0.85

Tested by

no test coverage detected