[Math] Do calculators have floating point error

arithmeticcalculatorcomputer science

As a programmer, we have been told about floating points errors on computer. Do Calculators have floating point error too?

Example.

0.1 (display) = .0999999998603016  (actual value used) on computers

Not really 0.1 But you can see it is close.

Best Answer

Calculators are computers, too; they're just smaller. Surely if we knew how to represent arbitrary real numbers inside calculators, we could do the same thing with desktop computers.

That said, it's possible—both on a calculator and on a computer—to represent some real numbers exactly. No computer I know of would represent $\frac12$ inexactly, since its binary expansion (0.1) is short enough to put inside a floating point register. More interestingly, you can also represent numbers like $\pi$ exactly, simply by storing them in symbolic form. In a nutshell, instead of trying to represent $\pi$ as a decimal (or binary) expansion, you just write down the symbol "$\pi$" (or, rather, whatever symbol the computer program uses for $\pi$).

Related Question