DATAMATH

DATAMATH  CALCULATOR  MUSEUM

Logarithm Bug

TI-35X.jpg (53059 Byte)The TI-35X and TI-36X SOLAR introduced in 1991 an algorithm problem still present in calculators sold in 2015, e.g. the TI-30Xa and the TI-36X SOLAR. This article explains the bug, its effect on the yx function, lists all affected calculator models and compares the precision of different calculators developed in a timeframe of almost 30 years.

Last but not least the article mentions the "Logarithm Bug - Reloaded".

The Bug 

Essentially, the TI-35X calculates inaccurate values for ln(1 + x) where x is a small number, 
for example, 1*10-9 < x < 1*10-6

The following table gives a comparison of the correct value and the TI-35X (rounded to 10 digits, RED numbers indicate wrong results):

1 + x

ln(1 + x) TI-35X
1.1 9.531017980*10-02 9.531017980*10-02 
1.01 9.950330853*10-03 9.950330854*10-03
1.001 9.995003331*10-04 9.995003334*10-04
1.0001 9.999500033*10-05 9.999500067*10-05
1.00001 9.999950000*10-06 9.999950243*10-06
1.000001 9.999995000*10-07 9.999998344*10-07 
1.0000001 9.999999500*10-08 1.000002575*10-07
1.00000001 9.999999950*10-09 1.000033249*10-08
1.000000001 9.999999995*10-10 1.000335068*10-09

The yx Function

A strange side effect of the logarithm bug is the related yx function, most calculators use the rule
ln(yx) = x * ln(y) to calculate the xth power of y.

Example:

53: e(3 * ln(5))  = 125

Keystrokes

Results

[5] [ln] 1.6094379
[*] [3] [=] 4.8283137
[2nd] [ex] 125

The best way to demonstrate the logarithm bug could be found with the exponential function, one of the most important functions in mathematics. It is written as ex and can be defined as a limit of a sequence:

The calculation of this expression will yield to unexpected results due to:
The ln(1 + x) problem
The way yx is calculated

The following table compares the results of the above expression for some values of n using four different calculators (rounded to 8 digits, RED numbers indicate wrong results):

n SR-51 
(1975)
TI-35 PLUS
(1986)
TI-30X
(1994)
TI-36X SOLAR
(2004)
10 2.5937425 2.5937425 2.5937425 2.5937425
100 2.7048138 2.7048138 2.7048138 2.7048138
1,000 2.7169239 2.7169239 2.7169239 2.7169239
10,000 2.7181459 2.7181459 2.7181459 2.7181459
100,000 2.7182682 2.7182682 2.7182683 2.7182683
1,000,000 2.7182805 2.7182805 2.7182814 2.7182814
10,000,000 2.7182818 2.7182817 2.7182888 2.7182888
100,000,000 2.7182818 2.7182818 2.7183727 2.7183727
1,000,000,000 2.7182818 2.7182818 2.7191928 2.7191928

Affected Calculator Models

The Logarithm Bug is present in all calculators based on the algorithm of the Toshiba T6A57 (TI-36X Solar) , T6A58 (TI-35X), T6A61 (TI-30X), T6M38 (TI-30X Solar), T6M79 (TI-30Xa Solar, TI-30Xa SE) and T6M80 (TI-30Xa).

These calculators could identified by a result of 9.00000229461 running Mike Sebastian's "Calculator forensics". A typical feature of the affected calculators is a 10-digit display and 12-digit precision of the internal calculations. 

The Fix

The Logarithm Bug was fixed in 2015 with the TI-30XA and TI-30 ECO RS.

Different Calculators

During the research of the calculating precision realized in different calculators we noticed some strange results:

Cheap calculators like the TI-34 produce better results than expensive ones, e.g. the TI-65.
Early calculators like the TI-66 may produce better results than later ones, e.g. the TI-68.
Some calculators like the TI-25 are honest and suppress inaccurate digits.
Calculators with Toshiba brains like the BA-SOLAR may produce identical results with TI powered ones, e.g. the TI-65.
All Two-Liners - even the TI-15 produce identical - and perfect - results.
Mike Sebastian's Calculator forensics groups calculators perfectly, the SC-10 matches e.g. the TI-34.
Financial calculators like the BA-II Plus are better than their Scientific counter parts, e.g. the TI-68.
Calculators developed for students may fail with unexpected results, discover the Math Explorer.  
 
 

 

n TI-25 
(1978)
TI-66
(1983)
BA-SOLAR
(1986)
TI-65
(1987)
TI-34, SC-10
(1987..1989)
10 2.59374__ 2.5937425 2.5937425 2.5937425 2.5937425
100 2.70481__ 2.7048138 2.7048138 2.7048138 2.7048138
1,000 2.71692__ 2.7169239 2.7169239 2.7169239 2.7169239
10,000 2.71815__ 2.7181459 2.7181459 2.7181459 2.7181459
100,000 2.71827__ 2.7182682 2.7182682 2.7182682 2.7182682
1,000,000 2.71828__ 2.7182805 2.7182818 2.7182818 2.7182805
10,000,000 2.71828__ 2.7182817 2.7182818 2.7182818 2.7182817
100,000,000 2.71828__ 2.7182818 2.7182818 2.7182818 2.7182818
1,000,000,000 1.0000000 2.7182818 2.7182818 2.7182818 2.7182818

 

n TI-68 
(1989)
Math Explorer
(1991)
  BA-II Plus
(1991)
TI-40 Solar
(1995)
TI-15
TI-30X IIB

( 1999)
10 2.5937425 2.5937425 2.5937425 2.5937425 2.5937425
100 2.7048138 2.7048138 2.7048138 2.7048138 2.7048138
1,000 2.7169239 2.7169238 2.7169239 2.7169239 2.7169239
10,000 2.7181459 2.7181459 2.7181459 2.7181459 2.7181459
100,000 2.7182682 2.7182546 2.7182682 2.7182682 2.7182682
1,000,000 2.7182805 2.7182818 2.7182805 2.7182806 2.7182805
10,000,000 2.7182817 Error U 2.7182817 2.7182801 2.7182817
100,000,000 2.7182813   2.7182818 2.7182913 2.7182818
1,000,000,000 2.7182788   2.7182818 2.7183790 2.7182818

Logarithm Bug - Reloaded

Texas Instruments stopped in 2000 the production of the new two-line calculators TI-30X IIB, TI-30X IIS, TI-34 II, and TI-40 Collège II and announced a replacement offer running through January 31, 2001. What happened?

Customers reported the calculators with production date codes earlier than N1299 or C1299 returned incorrect answers on specific, multi-decimal-place values in combination with specific functions. The chance of this situation occurring in an individual's average use is remote but engineers of Texas Instruments fixed the software bug.

Please find the original announcement retrieved from the Texas Instruments calculator website:

Important Notice for Owners of the TI-30X IIS, TI-30X IIB, TI-34 II, and TI-40 College II

This replacement offer is good through January 31, 2001.

We listen to our customers, especially when you tell us things you don't like.

We've been pleased to hear that you like our new, two-line calculators, and we're proud of the benefits they provide. But we were extremely surprised and concerned when we heard that when specific, multi-decimal-place values are used in combination with specific functions in our TI-30X IIS, TI-30X IIB, TI-34 II, and our TI-40 College II, an incorrect answer is returned.

We halted production of these products and fixed the software. As we did so, our engineers concluded that the chance of this situation occurring in an individual's average use is remote, given the specific functions and combinations needed. (These are detailed below.) 
However, these errors are not consistent with our efforts to provide you with the best possible educational products for your needs.

New, revised product is now shipping to stores. If, however, you have affected product*, and you're concerned about its performance, please contact us at the phone numbers or email address listed below and we will replace your product.


* In order to confirm that the above issue impacts your calculator, please check the date code, which is stamped into the plastic, or on a small, plastic label, on the back of your calculator. Date codes begin with either an "N" or a "C", and then four numbers follow. Only calculators with date codes earlier than 1299 are affected, for example N0699 or C0899.

[Telephone numbers and email address omitted.]

Background - TI-34 II, TI-40 College II

For the TI-34 II and the TI-40 College II, the following functions and ranges will give incorrect results for products with date codes earlier than 1299. The result for the range limits shown will be correct and the values between these limits will be incorrect.

The log() and ln() Function

Also YX if Y is inside the range shown and X is any value other than an integer in the range {0,9}.
Also X ROOT Y if Y is inside the range shown and X is not equal to one or negative one.
Also CUBE ROOT X if X is inside the range shown.

Entry Value between 1.221402765935 and 1.222222222223

Entry Value between 1.020201346154 and 1.020202020203

Entry Value between 1.002002001340 and 1.002002002003

Entry Value between 1.000200020001 and 1.000200020003

Entry Value between 0.9801980198019 and 0.9801986674200

Entry Value between 0.9980019980019 and 0.9980019986620

Background - TI-30X IIS, TI-30X IIB

For the TI-30X IIS and the TI-30X IIB, the following functions and ranges will give incorrect results for products with date codes earlier than 1299. The results for the range limits shown will be correct and the values between these limits will be incorrect.

The log() and ln() Function

Also YX if Y is inside the range shown and X is any value other than an integer in the range {0,9}.
Also X ROOT Y if Y is inside the range shown and X is not equal to one or negative one.
Also CUBE ROOT X if X is inside the range shown.

Entry Value between 1.221402765935 and 1.222222222223

Entry Value between 1.020201346154 and 1.020202020203

Entry Value between 1.002002001340 and 1.002002002003

Entry Value between 1.000200020001 and 1.000200020003

Entry Value between 0.9801980198019 and 0.9801986674200

Entry Value between 0.9980019980019 and 0.9980019986620

The tanh-1() Function

Also gives incorrect results for the negatives of the values below:

Entry Value between 9.966799777635 e-02 and 1.0 e-01

Entry Value between 9.999669682703 e-03 and 1.0 e-02

Entry Value between 9.999996696697 e-04 and 1.0 e-03

Entry Value between 9.999999966966 e-05 and 1.0 e-04

Entry Value between 9.999999999669 e-06 and 1.0 e-05

Entry Value between 9.999999999996 e-07 and 1.0 e-06

The cosh-1() Function

Entry Value between 1.005004168374 and 1.005037815260

Entry Value between 1.000050000446 and 1.000050003751

The sinh-1() Function

Also gives incorrect results for the negatives of the values listed below:

Entry Value between 1.001667532187 e-01 and 1.005037815259 e-01

Entry Value between 1.000016967064 e-02 and 1.000050003750 e-02

Entry Value between 1.000000169669 e-03 and 1.000000500000 e-0

Entry Value between 1.000000001696 e-04 and 1.000000005000 e-04

Entry Value between 1.000000000016 e-05 and 1.000000000050 e-05

(c) Copyright 2000 Texas Instruments Incorporated. All rights reserved.

 

horizontal rule

If you have additions to the above article please email: joerg@datamath.org.

© Bob Senzer, Mike Sebastian and Joerg Woerner, July 12, 2004 and October 11, 2005. No reprints without written permission.