How calculators compute stuff (like irrational exponentiation)

  • Context: High School 
  • Thread starter Thread starter davidbenari
  • Start date Start date
  • Tags Tags
    Calculators Irrational
Click For Summary

Discussion Overview

The discussion revolves around how calculators compute operations involving irrational exponentiation, specifically the calculation of ##5^{1/\pi}##. Participants explore the methods calculators might use to handle such computations, including the storage of the value of pi and the algorithms involved.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses curiosity about how calculators determine the number that raised to the power of pi gives 5, questioning the underlying process.
  • Another suggests that calculators could convert the expression to logarithmic form to find the answer.
  • A participant states that calculators store an approximation of pi, implying that this is a straightforward process.
  • One contributor discusses the use of linear interpolation methods to find the zero of a specific function related to the calculation, emphasizing the iterative nature of achieving precision.
  • Another participant mentions that typical calculators display numbers to about 30 decimal places and store them with an additional precision, specifically noting the use of CORDIC algorithms for calculations.
  • A later reply corrects a previous statement about the range of pi, indicating that it is between 1 and 10, not between 1 and 0.

Areas of Agreement / Disagreement

Participants present multiple competing views on how calculators compute irrational exponentiation and store values like pi. The discussion remains unresolved regarding the specifics of these methods and the accuracy of the statements made.

Contextual Notes

There are limitations regarding the assumptions made about the storage and representation of pi, as well as the precision of the calculations. The discussion does not resolve the mathematical steps involved in the proposed methods.

davidbenari
Messages
466
Reaction score
18
I'm just curious as to how a calculator does the following operation:

##5^{1/\pi}##

I mean, it has to look for the number that raised to the power of pi, gives me 5. I think that's insane. How does it do that?

How does a calculator store the value of pi? -- I guess that's a more boring question because it might as well be it just "stores" it.
 
Mathematics news on Phys.org
it could convert the expression to log form and convert the answer back.

log(5)/pi = log(ans)
 
davidbenari said:
How does a calculator store the value of pi? -- I guess that's a more boring question because it might as well be it just "stores" it.
A calculator stores an approximation to pi.
 
Depends on your calculator, of course. We can use linear interpolation based methods if we want. Just repeat the operation to get within a needed precision. Let's demonstrate. We want to calculate ##5^{1/\pi}##. This is equivalent to finding the zero of
##f(x) = \log(x) - \pi^{-1} \log(5)##
We can assume that ##\pi^{-1}## is known, and also assume the logarithm function is cheap.
We need to test various points where the function changes sign. Suppose that ##f(s) < 0## and ##f(t) > 0## and s and t are near each other. Then
##x \approx \frac{sf(t)-tf(s)}{t-s}##.
Repeat until you get your desired precision.

There are faster techniques for trig functions, exponentials and logarithms (such as CORDIC and BKM). But these are for when you are working on a computer without hardware acceleration (very unlikely these days)
 
A typical calculator shows numbers to about 30 places and stores them to one more place than it shows. It would store "pi" as an integer,
"3141592..." and a power of 10- 0, since pi is between 1 and 0. Most calculators now use the "CORDIC" algorithms.
 
HallsofIvy said:
since pi is between 1 and 0
Surely you meant "between 1 and 10".
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 21 ·
Replies
21
Views
5K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K