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

Function intCmp

src/compute-engine/rubi/rubi-utils.ts:1065–1075  ·  view source on GitHub ↗
(
  args: Json[],
  ctx: Ctx,
  cmp: (a: number, b: number) => boolean
)

Source from the content-addressed store, hash-verified

1063 },
1064 // IntegralFreeQ[u] := u contains no inert integral node
1065 // (IntegrationUtilityFunctions.m: FreeQ of Int/Integral/Unintegrable/
1066 // CannotIntegrate). Gates a Chapter-3 rule on its IntHide result closing.
1067 IntegralFreeQ: (args, ctx) => !build(args[0], ctx).has('Integrate'),
1068 AtomQ: (args, ctx) => !build(args[0], ctx).ops,
1069 OddQ: (args, ctx) => {
1070 const r = realNum(build(args[0], ctx).evaluate());
1071 return r !== null && Number.isInteger(r) && Math.abs(r % 2) === 1;
1072 },
1073 EvenQ: (args, ctx) => {
1074 const r = realNum(build(args[0], ctx).evaluate());
1075 return r !== null && Number.isInteger(r) && r % 2 === 0;
1076 },
1077 // raw relational heads (older Rubi guards; symbolic operands ⇒ false)
1078 Less: (args, ctx) => cmpChain(args, ctx, (a, b) => a < b),

Callers 1

rubi-utils.tsFile · 0.85

Calls 5

isLiteralIntegerFunction · 0.85
realNumFunction · 0.85
cmpFunction · 0.85
buildFunction · 0.70
evaluateMethod · 0.65

Tested by

no test coverage detected