Is there a method besides a Taylor series to calculate $x^y$, where $x$ and $y$ are rational numbers? So for example, I require a method to calculate $2.128321\dots^{5.3212\dots}$ to a certain amount of digits. I realize that Taylor series are always an option, but is that what is used in calculators and computers? If not, what is used?
Asked
Active
Viewed 33 times
0
-
@DietrichBurde when thinking about this, I considered doing what you're describing-- finding the quotient of the rational number and taking the n-th root. But is that what is required? This will be very computationally expensive – Jcsq6 Nov 29 '21 at 20:18
-
Also, there are further problems, see this post and its answers. It involves using the principal value of an complex expression. – Dietrich Burde Nov 29 '21 at 20:19
-
@DietrichBurde all I need is to be able to take a rational number to another rational number that are each precise to an arbitrary amount, and find the result of it. This is possible, I'm sure, but I also see the problem you've shown. – Jcsq6 Nov 29 '21 at 20:22
-
The you need to restrict to positive rational numbers, I guess. – Dietrich Burde Nov 29 '21 at 20:23
-
@DietrichBurde is it only undefined when b <= 0? – Jcsq6 Nov 29 '21 at 20:23
-
1$x^y = \exp(y \ln(x))$ (for $x > 0$). There are many numerical methods for computing exponentials and logarithms. For example, you might look at this – Robert Israel Nov 29 '21 at 20:25
-
@RobertIsrael the problem is, any function like ln(x) would come back to the same problem, as the usable functions are ones I'm building from scratch (infinite floating point) – Jcsq6 Nov 29 '21 at 20:28