Hey,
Looking for some advice on how to approach this I no Code::Blocks has long long ints which is up to 8bytes or 9..... something... I actually need to make this thing bigger haha. I'm working on Ackermann's functions trying to basically compute as many numbers as I can.
Here's my code (yes I no my exponents are not coded right)
int acker(int m,int n)
{
if (m == 0)
return (n + 1);
if (m == 1)
return (2 + (n + 3) - 3);
if (m == 2)
return (2 * (n + 3) - 3);
if (m == 3)
return ((pow(2,(n + 3))) - 3);
if (m == 4)
return ((2^(2^(n + 3))) - 3);
if (m == 5)
return ((2^(2^(2^(n + 3)))) - 3)
if (m == 6)
return ((2^(2^(2^(2^(n + 3)))))) - 3)
}
//Numbers to be put into function
int main()
{
for(int i = 0; i < 1; i++){
printf("%d ", acker(3,5)); // Inpute Ackerman numbers into acker()... Currently processing 2 bytes
// Can not handle more then the Ackermann # (3,12) or (4,0)
// Output must = less then 32768
}
return 0;
If you can get this to work to compute 2^65536 power which has 19,727 digits I'd really appreciate it and if u can get it to go even further lol and get it to compute 2^18,446,744,073,709,551,616 then I envy you haha.
Acker(3,12) = 32768
Acker(4,1) = 65533
the 2 numbers I'm trying to compute are
Acker(5,1) and Acker(5,3)
Thanks for the help guys