When the calculator displays the digits of $\pi$, how does it arrive at that answer? Also, at what digit does the approximation of $\pi$ stop at?

  • 5
    $\begingroup$ I'd imagine it depends on the calculator. $\endgroup$ Commented May 1, 2012 at 0:39
  • 3
    $\begingroup$ The simple approach would be as a stored constant. Need it anyway for radian/degree. $\endgroup$ Commented May 1, 2012 at 0:43
  • 2
    $\begingroup$ Storing a constant like $\pi$ to some fixed precision is not really much of a technological feat. You might be interested in some more computational details, such as how a typical calculator computes inverse trigonometric functions via CORDIC routines. $\endgroup$
    – hardmath
    Commented May 1, 2012 at 0:45
  • 1
    $\begingroup$ No number is irrational on a calculator. $\endgroup$ Commented May 1, 2012 at 0:49
  • 1
    $\begingroup$ No number is irrational on anything that uses floating-point arithmetic, period. $\endgroup$ Commented May 1, 2012 at 1:12

2 Answers 2


I'm not an expert in calculators, but here's my understanding: The calculator doesn't calculate $\pi$. It has a numerical approximation programmed in, up to some degree of precision which is almost certainly more than the number of decimal places that fit in the display. Then it treats $\pi$ like any rational constant. If you want to see how far your calculator goes, here's what you can do:

First, enter $\pi$ into your calculator. Subtract 3. Multiply by 10. Subtract 1. Multiply by 10. Subtract 4, multiply by 10, subtract 1, multiply by 10, etc, getting rid of more and more digits. Eventually you'll run out of digits, get 0, or hit some other other sort of error. If you keep track of how many steps this takes, you'll find out how many digits of $\pi$ your calculator has "memorized."

  • 3
    $\begingroup$ My guess is between 9 and 15. I like this experiment. +1 $\endgroup$
    – davidlowryduda
    Commented May 1, 2012 at 1:04
  • 1
    $\begingroup$ Indeed, constants in most calculators are cached and not computed. To use the TI-83 Plus as an example: try π-3.1415926. Actually, that makes for a slightly more efficient technique than Brett's: output the constant, note how many digits are displayed, and subtract from the constant an approximation from the digits displayed. Note how tiny the result is and how many digits are displayed. $\endgroup$ Commented May 1, 2012 at 1:11

There's a difference between idealized mathematics and the real world calculations which require definite answers of some precision (significant digits), $\pi$ is not only irrational, it is transcedental. The computer resoloves down to a $n$-bit approximation, which is mostly impeded only by register size and the actual design of the microprocessor that powers it. It is simply a constant floating point value of varying bit-depth and is treated as such.

You can do lots of clever tricks and processing, creating huge-digit numbers which can be intrepreted by the software in terms of multiple bytes banded together ( even though it crosses register size ). But at the end of the day, every attempt to have $\pi$ naturally in the system, as an irrational and transcendental constant it is, is impossible. Computers are fundamentally deterministic and finite.

The precision varies from financial calculators, home calculators to scientific calculators. Also, defer back to hardmath's comment, CORDIC routines are interesting when the given implementation of a calculator doesn't have a hardware multiplier.

In the end: It is represented as a finite constant approximation of varying bit-depth depending on the platform it is implemented on and stored in the varying size ROM. Example, iPhone's Calculator PI constant is at around ~17 digits (bear in mind that the architecture of the iPhone is much more complex than a calculator and the representation of $\pi$ could be a lot better if you implemented it yourself using clever programming).

  • $\begingroup$ One question, how do you express a some number of decimal digits in terms of bits? $\endgroup$ Commented May 1, 2012 at 1:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .