Libraryless. Click here for Pure Java version (2583L/16K).
1 | static BigInt ackermann(BigInt a, BigInt b) {
|
2 | if (a.equals(BigInt.ZERO)) |
3 | ret plus(b, BigInt.ONE); |
4 | if (b.equals(BigInt.ZERO)) |
5 | ret ackermann(a.subtract(BigInt.ONE), BigInt.ONE); |
6 | ret ackermann(minus(a, BigInt.ONE), ackermann(a, minus(b, BigInt.ONE))); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030372 |
| Snippet name: | ackermann [Ackermann function] |
| Eternal ID of this version: | #1030372/2 |
| Text MD5: | 8b2d1618378e21103ace21ae140956a3 |
| Transpilation MD5: | 4e37eefd2853293c7e4a1e054a1d5dea |
| Author: | stefan |
| Category: | javax / maths |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-12-10 12:57:43 |
| Source code size: | 270 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 463 / 590 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |