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

Function permute

src/compute-engine/library/combinatorics.ts:288–301  ·  view source on GitHub ↗
(
          prefix: Expression[],
          rest: Expression[]
        )

Source from the content-addressed store, hash-verified

286 signature: '(n:number, m:number) -> number',
287 type: ([n, k]) => binomialType(n, k),
288
289 evaluate: ([n, k], { numericApproximation, engine: ce }) =>
290 evaluateBinomial(n, k, numericApproximation, ce),
291 },
292 },
293
294 {
295 Fibonacci: {
296 description: 'Compute the nth Fibonacci number.',
297 wikidata: 'Q47577',
298 signature: '(integer) -> integer',
299 type: () => 'finite_integer',
300 evaluate: ([n], { engine: ce }) => {
301 const k = toBigint(n);
302 if (k === null) return undefined;
303
304 // Compute F(|k|); negative indices use the reflection formula below.

Callers 1

combinatorics.tsFile · 0.70

Calls 1

sliceMethod · 0.65

Tested by

no test coverage detected