1
$\begingroup$

I am trying to determine how many bits the TI-83 Plus uses to store floating point numbers. I am using the algorithm for approximating the machine epsilon given in "Numerical Mathematics and Computing" by Cheney and Kincaid. In TI-BASIC, it looks like this:

: 1 -> E
: While (1+E) > 1
: E/2 -> E
: End
: Disp 2*E 

The program returns 9.31322575E-10, which is equal to $2^{-30}$. This is an approximation within a factor of 2.

Here's where I get confused. In the textbook I mentioned above, they say that the number of binary digits used in the mantissa, $k$, is given by $u=2^{-k}$, where $u$ is the number we just found. This is easy to verify for things like IEEE-754 format, because the mantissa is stored as its base 2 representation, so k is the number of bits allocated to the mantissa. However, as far as I can tell from sources like this, the TI-83 does not use IEEE-754 floating point, but different floating point encoding scheme with 7 bytes of binary-coded decimal for the mantissa (that's 14 decimal digits). If that is true, then it seems to me like the machine epsilon should be $10^{-14}$. Furthermore, this means the number of mantissa bits is 56, rather than 30.

How can I rectify these two things?

$\endgroup$
2
$\begingroup$

the TI-83 does not use IEEE-754 floating point, but different floating point encoding scheme with 7 bytes of binary-coded decimal for the mantissa (that's 14 decimal digits).

Yes, and in order to deal with that, the program should take into account the base of 10:

1->E
While (1+E)>1
E/10->E
End
Disp 10*E

This results in $10^{-9}$, not $10^{-14}$ - though actually 14 digits would imply that $\epsilon = 10^{-13}$. There's still something missing to explain that result, and that thing is that the TI83+ sometimes rounds to 10 digits, for example for printing, but also for the purpose of comparisons. For the purpose of subtraction, that rounding is not performed. You can see the difference with a program like this, showing that there is more internal precision than 10 digits after all:

1->E
While (1+E)>1
E/10->E
End
10E->E
For(X,1,5
Disp 1+E-1
E/10->E
End

This program shows that evaluating $1+E-1$ for $E = 10^{-12}$ still does not yield zero, while for $E = 10^{-13}$ it does yield zero. We should be careful not to conclude that therefore $\epsilon = 10^{-12}$, it's more complicated. There seems to be a special rule the zeroes out small differences. That elusive 14th digit does exist though it's well hidden, for example this demo shows it:

1+8|E~13->X
Disp X*2-2

(this is SourceCoder syntax, |E is the small E made by pressing 2nd and ,, ~ is unary negation (-)).

This program doesn't print zero, so the 14th digit has to exist internally, even though the TI83+ tries very hard to deny it. Whether this means we should say that $\epsilon = 10^{-13}$ is not clear to me. $1 + 10^{-13}$ is technically different from $1$, but they compare equal and evaluating their difference yields zero.

$\endgroup$
1
  • $\begingroup$ Thanks for the nuanced answer. Finding out these sorts of things is a lot less simple than I would have thought at first glance. $\endgroup$ – irowe Feb 11 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.