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

Function scan

src/compute-engine/boxed-expression/solve.ts:912–928  ·  view source on GitHub ↗
(node: Expression)

Source from the content-addressed store, hash-verified

910 match: ['Add', ['Arccos', '_x'], '__b'],
911 replace: ['Cos', ['Negate', '__b']],
912 id: 'solve.arccosine-unit',
913 useVariations: true,
914 condition: filter,
915 },
916
917 // a·arctan(x) + b = 0 => x = tan(-b/a)
918 {
919 match: ['Add', ['Multiply', '__a', ['Arctan', '_x']], '__b'],
920 replace: ['Tan', ['Divide', ['Negate', '__b'], '__a']],
921 id: 'solve.arctangent',
922 useVariations: true,
923 condition: (sub) => filter(sub) && !sub.__a.isSame(0),
924 },
925
926 // arctan(x) + b = 0 => x = tan(-b)
927 {
928 match: ['Add', ['Arctan', '_x'], '__b'],
929 replace: ['Tan', ['Negate', '__b']],
930 id: 'solve.arctangent-unit',
931 useVariations: true,

Callers 1

solveSingleSqrtEquationFunction · 0.85

Calls 4

isFunctionFunction · 0.90
hasMethod · 0.65
toStringMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected