Re: Calculation Of Exponentiated Values--How Is It Done?

From: Timothy Little (tim-via-n.i.net_at_little-possums.net)
Date: 02/05/05


Date: 5 Feb 2005 21:57:37 GMT

Travis wrote:
> I understand 5^4 = 5 * 5 * 5 * 5 = 625. That's not the problem. That's
> easy.
> But how is 5 ^ 4.68723 calculated??? How do you get a value for that?

In practice, usually by e^(4.68723*ln(5)) with some approximation
method for e^x and ln(x).

Mathematically, x^(-n) is defined to be 1/(x^n). That extends the
definition to the integers.

For rationals, x^(n/m) is defined as the m'th root of x^n (for n, m
integers and x > 0). So your example would be the (postive real)
100000th root of 5^468723. Not very useful in practice, but that's
where the definition comes from.

For irrational y, you can choose any sequence of rationals (q_n) that
converges to y, and set x^y to be the limit of the sequence (x^{q_n}).

> Does anyone know how the above can be calculated on paper?

Messily. Very messily. Easier if you have good tables of logarithms.

> And as far as the calculator's computation, does anyone have any
> idea how that works, or know of any informative links? I assume the
> calculator operates on some sort of iterative process.

One of the easier methods to grasp is a Taylor series:
 e^x = 1 + x^2/2 + x^3/6 + ... + x^n/n! + ...

When |x| < 1 this converges rather quickly, but it does technically
work for any x. If x > 1 then you can repeatedly apply
 e^x = (e^(x/2))^2 to make it converge faster.

You can also use
 ln(x+1) = x - x^2/2 + x^3/3 - ... - (-1)^n x^n / n + ...

This is only valid for |x| < 1, and preferably |x| should be small.
If |x| > 1, you can use a similar trick to find a converging series:
 ln(x) = 2 ln(sqrt(x)).

These are far from the fastest methods, but they work and are
relatively easy to remember.

- Tim



Relevant Pages

  • Re: Newbie question: whats this dot?
    ... When I divide using ... As I want to use this to calculate Taylor series and other such ... sequences, I really need the decimal representation. ... rationals in lisp? ...
    (comp.lang.scheme)
  • Re: Usenet-controversial
    ... under the assumption that the rationals and the relations ... > This is clearly not the case for some irrationals: ... the fact that every term in certain Taylor series is ... > rational suggests that they are, in which case a legitimate question ...
    (rec.arts.sf.written)
  • Re: Best processors for trig?
    ... What's the canonical method of doing this? ... Taylor series are far too computationally intensive for any practical ... so in practice some kind of polynomial is used. ... 3-4or 6-8 order polynomials are usually sufficient. ...
    (comp.arch.embedded)