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.
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.
On
They do as long as you don't use one that uses symbolical calculations like the modern TI or Casio calculators.
One way to see it is to calculate iteratively roots of a number and then square the results again, if you do it often enough you will get a different result than the input due to numerical errors, this doesn't only have to do with the floating point representation but also with inaccurate root algorithms used in the calculator.
On
Interestingly floating point error comes from the fact that certain numbers can't be represented in certain bases without using repeating numbers. For example, 10/3 can't be represented in base 10 without using repeating trailing 3's and so there's technically a precision error if you don't indicate the numbers keep repeating. However, 10/3 in base 3 is represented as 10.1. Binary has the same problem, and so some answers that are easy to represent in base 10, are repeating in base 2, and so when doing the conversion back and forth you get a precision error, but it's because the computer was doing best approximation, just like writing 10/3 = 3.33333333333, is technically wrong. .1 + .2 = 0.30000000000000004 is actually a pretty good approximation. The actual technicalities of floating point error are a little more complicated but for example, .1 can't be represented in binary without repeating numbers.
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$).