1
0
Fork
You've already forked ackermann
0
No description
  • JavaScript 100%
2024年07月27日 16:50:12 +02:00
.gitignore let there be code 🌱 2024年07月27日 16:49:23 +02:00
index.js let there be code 🌱 2024年07月27日 16:49:23 +02:00
package.json let there be code 🌱 2024年07月27日 16:49:23 +02:00
README.md clean up travis 2024年07月27日 16:50:12 +02:00
test.js let there be code 🌱 2024年07月27日 16:49:23 +02:00

ackermann

The Ackermann function. Only for theoretical interest in non primitive recursion. Otherwise completely useless and will kill your program. For more background check out this Computerphile episode with Professor Brailsford.

Usage

const A = require('ackermann')
console.log(A(3, 4)) // -> 125

For larger values of m or n you will run into RangeError: Maximum call stack size exceeded so you need to tell v8 to use a larger stack size. This is done by setting the --stack_size v8 argument, which is specified in kB.

node --stack_size=100000 program.js

License

MIT