Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1030380 // ackermann_int [Ackermann function on ints]

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (32L/1K).

static int ackermann_int(int a, int b) {
  if (a == 0)
    ret b+1;
  if (b == 0)
    ret ackermann_int(a-1, 1);
  ret ackermann_int(a-1, ackermann_int(a, b-1));
}

Author comment

Began life as a copy of #1030372

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030380
Snippet name: ackermann_int [Ackermann function on ints]
Eternal ID of this version: #1030380/3
Text MD5: 5714946e3705f1b72aada5c951da3b76
Transpilation MD5: af5cc49af9cc52a47c2a10649a0dbcb5
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 14:37:03
Source code size: 169 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 210
Version history: 2 change(s)
Referenced in: [show references]