by omoikane · 3y ago · 0 comments
This seems to only trigger in limited circumstances, one of my favorite accidentally true expression is still warning-free:
printf("%d\n", 2^5); // Warning here.
assert((3^2) + (4^2) == (5^2)); // No warnings.
https://gcc.godbolt.org/z/4GqdEMfPbIt hasn’t in this sense. The ^n operator flips the ‘one’ bits in n in its argument, so for any n, we have
a = a^n^n
So, for all a and b, a^n + b^n = ((a^n + b^n)^n)^n
that makes c = (a^n + b^n)^n
a solution to a^n + b^n = c^n
and that means we can find a c for every n, a and b.