| 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. |