How do I compute $\text{(irrational)}^{\text{(irrational)}}$ up to a required number of decimals say m, in the fastest way ? (one way is of course compute both the irrational numbers to a precision much larger than m and then solve it... but you never know how much excess of m you will need to calculate the irrationals.. )
Irrational$^\text{Irrational}$
8
$\begingroup$
irrational-numbers
-
5I think most calculators would calc $a^b = 2^{b\log_2 a}$, since they have fast and reliable procedures for calculating $2^{.}$ and $\log_2$. – 2011-01-22
-
2On a sidenote, if you're working with really *huge* numbers and you're still using the standard multiplication, you might want to check out this site: http://en.wikipedia.org/wiki/Multiplication_algorithm E.g. check the section on karatsuba – 2011-01-22
-
0Regarding the a^b=2^blog2(a) method, upto what precision will you express log2(a) [assuming I want a^b upto m decimals]?? because this is again an irrational term in the power... – 2011-01-22
-
0This may help you approximate the error term for $\epsilon$ small: $2^{a+\epsilon} = 2^\epsilon \cdot 2^a \approx (1 + \epsilon\ln 2/2) \cdot 2^a \approx 2^a + 0.69 \epsilon 2^a$. Actually I think physicists are good at this kind of stuff, because it can be treated as some sort of measurement uncertainty. Maybe you'll find some good reference in that direction. – 2011-01-22
-
0@Guanidene, Some irrational numbers are not computable. So you cannot compute this in general. If $a$ and $b$ are computable (whether irrational or not) you can compute $a^b$. – 2011-05-12
-
0@Guanidene, so the point is, you need to fix a computable set of numbers if you want an algorithm. – 2011-05-12
-
0@Guanidene, If this question is actually about how many digits of $a$ and $b$ are needed to compute $n$ digits of $a^b$ you should improve the question a bit to make that clearer. – 2011-05-12
-
0One possible way is to use $a^b= e^{b \ln a}$ and use the Taylor series for the exponential, since it converges pretty fast. Of course this approach has a downside, namely that you also need to estimate $b \ln a$... – 2011-05-12
-
0@quanta - suppose i wish to calculate pi^e. Now please tell me how will you proceed. – 2011-05-16
-
0Well, the way you proceed depends on how good your estimate needs to be.... – 2011-05-16
-
0Do you mean "What is the fastest algorithm to compute the $n$th digit of $a^b$ over floating point?" or "What is the precision range for $a^b = e^{b \ln a}$ computed with Taylor series?" or something else? – 2011-05-16
-
0@user9176 - Suppose I wish to find upto 100 decimals exact. Please suggest an algo for the same – 2011-05-19
-
0@Mitch - I need the fastest way to compute a^b upto any number of decimal places (just need an algo which would work on paper, don`t worry about floating point numbers, precision, etc.). – 2011-05-19