What is the fastest way to check if $x^y > y^x$ if I were writing a computer program to do that?
The issue is that $x$ and $y$ can be very large.
What is the fastest way to check if $x^y > y^x$ if I were writing a computer program to do that?
The issue is that $x$ and $y$ can be very large.
If both $x$ and $y$ are positive then you can just check: $$ \frac{\log(x)}{x} \gt \frac{\log(y)}{y}$$ so if both $x$ and $y$ are greater than $e \approx 2.7183$ then you can just check: $$x \lt y$$