logoalt Hacker News

Sharlinyesterday at 10:34 PM1 replyview on HN

Is it buggy for at least 2^(n)^2? It gives 4 for any n, but surely for example 2^^2 = 2^(2^2) != 4?


Replies

OgsyedIEyesterday at 11:20 PM

2^^2 != 2^(2^2). Instead, 2^^2 = 2^2.

This will make more sense if you look at how the inputs a,b,n in the toy (2,2,3) and (2,3,3) present differently.

show 1 reply