Topic: The exp(ln(X)) bug, perhaps a new number?

Bonjour Jacques,

The famous exp(ln(2.02)) resulted in HP printing an Errata,
part of which said:

-------------------------------------------------
The numbers are 0.7030975114 and 0.995033085 x 10E-2,
or integer multiples of the latter number through nine,
by itself, or when added to the former.
-------------------------------------------------

I was curious as to whether there were any other numbers that
were not in the above "set" that would cause an incorrect answer
on the original HP35.

Doing a numerical search, I did find another number that does
not compute the exponential correctly on the original HP35.

exp(ln(1.12211)) = 1.111     

This can be shown using your HP35 emulator Jacques.

http://www.jacques-laporte.org/sim35bugs.htm

I assume the error will be there on a real (buggy) HP35.

I thought you may find it interesting Jacques, I searched
20 million values to find just ONE exception to the errata!

Regards, Kiwi Geoff (Christchurch, New Zealand)

Re: The exp(ln(X)) bug, perhaps a new number?

Hello Geoff,

It sounds you found another 'buggy' case.

See this video clip:

http://gallery.me.com/jacques.laporte#100258

I remarked immediately that this new case is somewhat linked to the old one exp(ln(2.02)), since :

2.02 = 2 * 1.01
1.12211 = 1.111 * 1.01

I hope I can clarify this case soon.

Thanks for this contribution.
Cheers.
Jacques.

Re: The exp(ln(X)) bug, perhaps a new number?

Hello Geoff,

I did not make a lot of investigations, but it appears that :

1.12211 = 1.1 * 1.01 * 1.01.

HP gave 2 'idiosyncratic' numbers, namely ln(2.02) and ln(1.01) ; it seems ln(1.111) is another one.
But HP also mentioned "integer multiples of the latter number through nine, by itself, of when added to the former" tongue  (see errata).
Is it the case? Or a new one.
Go compute!

Cheers,
Jacques

Re: The exp(ln(X)) bug, perhaps a new number?

jlaporte wrote:

HP gave 2 'idiosyncratic' numbers, namely ln(2.02) and ln(1.01) ; it seems ln(1.111) is another one.

But HP also mentioned
"integer multiples of the latter number through nine, by itself, of when added to the former" (see errata).
Is it the case? Or a new one.
Go compute!

Here is my "compute" Jacques.

If we "store" the following number in the original (buggy) HP35

9.95033085 EEX CHS 3 STO   

Now to show the INTEGER multiples (4 significant figures shown,
because the error is at the 1% level).

First number after = sign is the (buggy) HP35 answer, then
in brackets is the "correct" answer.

RCL 1 x EXP = 1.000 (1.010)
RCL 2 x EXP = 1.010 (1.020)
RCL 3 x EXP = 1.020 (1.030)
RCL 4 x EXP = 1.030 (1.041)
RCL 5 x EXP = 1.041 (1.051)
RCL 6 x EXP = 1.051 (1.062)
RCL 7 x EXP = 1.062 (1.072)
RCL 8 x EXP = 1.072 (1.083)
RCL 9 x EXP = 1.083 (1.094)

Now Integer values above 9

RCL 10 x EXP = 1.105 (1.105)
RCL 11 x EXP = 1.116 (1.116)
RCL 12 x EXP = 1.127 (1.127)
RCL 13 x EXP = 1.138 (1.138)

We can see that our new number (1.12211) falls in between integer
values 11 and 12.

Indeed we need to raise 1.01 to the power of 11.57859404 to reach
the value of 1.12211, and 11.57859404 is NOT an integer value.

So you see Jacques, I don't think the HP Errata (for the HP35) covers
ALL the cases. Because of the "rounding issue" you have so well explained
on your website for the exp(ln(X)) situation - there can be other numbers
( like 1.12211 ) that cause the original HP35 to give an incorrect answer
that needs to be muliplied by 1.01 to be correct.

So yes I think 1.12211 needs to be a "third" case, added to the HP35 errata.

Regards, Geoff Hitchcox (Christchurch, New Zealand).

Re: The exp(ln(X)) bug, perhaps a new number?

Hi Geoff,

I reproduce the errata from HP (circa dec. 1972) :

http://jacques-laporte.org/errata_1.gif

Deciphering the sentence "The numbers are 0.7030975114 and 0.9950330085 X 10-2,
or integer multiples of the latter through nine, by itself, or when added to the former",

I deduce that 'the latter" ln(1.1) can be multiplied by k {1 .. 9}
and the former ln(2.02) can be added.

So we have 2 sets of numbers

ln(1.01) . k  {1 .. 9}  (by itself)

and

ln(2.02) + ln(1.01) k {1 .. 9}

or

first category
1.01 ^ k  {1 .. 9}
second category
2.02 * (1.01 ^ k) {1 .. 9}

the numbers in the second set are always bigger than 1.12211
So the question is : is there a k to satisfy
1.12211 = 1.01 ^ k ??

Or k = ln(1.12211) / ln(1.01) = 11.57859 is NOT an integer, as you noted, correctly.

The answer is no.

I think you found a new case.
Congratulations.

ps I already noted in a paper regarding the HP35 "arg tan" flaw:
There are errors in the errata sheet!

Re: The exp(ln(X)) bug, perhaps a new number?

jlaporte wrote:

I think you found a new case.
Congratulations.

Merci beaucoup Jacques.

It was not until you put the expression in the form

jlaporte wrote:

first category
1.01 ^ k  {1 .. 9}
second category
2.02 * (1.01 ^ k) {1 .. 9}

Did I realise the use of ln(2.02) in the Errata is indeed very strange!

The "constants" used in the HP35 that are greater than Ln(1.01) are
Ln(1.1), Ln(2) and Ln(10).  Ln(2.02) is NOT a constant used in the HP35.

I decided to hunt again for errors, but this time start with
LN(1.01) with k = 1 to 9, in addition to Ln(1.1), Ln(2) and Ln(10).

As you can see below, we have found some "new" buggy numbers.

-------------------------------
ln(1.01) x 1 = 10 errors
exp( 9.950330850E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330851E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330852E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330853E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330854E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330855E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330856E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330857E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330858E-03 ) = 1.000000 , 0.990 % error
exp( 9.950330859E-03 ) = 1.000000 , 0.990 % error
ln(1.01) x 2 = 1 error
exp( 1.990066170E-02 ) = 1.010000 , 0.990 % error
ln(1.01) x 3 = 1 error
exp( 2.985099250E-02 ) = 1.020100 , 0.990 % error
ln(1.01) x 4 = 1 error
exp( 3.980132340E-02 ) = 1.030301 , 0.990 % error
ln(1.01) x 5 = 1 error
exp( 4.975165420E-02 ) = 1.040604 , 0.990 % error
ln(1.01) x 6 = 1 error
exp( 5.970198510E-02 ) = 1.051010 , 0.990 % error
ln(1.01) x 7 = 1 error
exp( 6.965231590E-02 ) = 1.061520 , 0.990 % error
ln(1.01) x 8 = 1 error
exp( 7.960264680E-02 ) = 1.072135 , 0.990 % error
ln(1.01) x 9 = 1 error
exp( 8.955297760E-02 ) = 1.082857 , 0.990 % error
-------------------------------
ln(1.1) + ( ln(1.01) x 1 )  = No error
ln(1.1) + ( ln(1.01) x 2 )  = 1 error
exp( 1.152108415E-01 ) = 1.111000 , 0.990 % error
ln(1.1) + ( ln(1.01) x 3 )  = No error
ln(1.1) + ( ln(1.01) x 4 )  = No error
ln(1.1) + ( ln(1.01) x 5 )  = No error
ln(1.1) + ( ln(1.01) x 6 )  = No error
ln(1.1) + ( ln(1.01) x 7 )  = No error
ln(1.1) + ( ln(1.01) x 8 )  = No error
ln(1.1) + ( ln(1.01) x 9 )  = No error
-------------------------------
ln(2) + ( ln(1.01) x 1 )  = 1 error
exp( 7.030975114E-01 ) = 2.000000 , 0.990 % error
ln(2) + ( ln(1.01) x 2 )  = No error
ln(2) + ( ln(1.01) x 3 )  = 1 error
exp( 7.229981731E-01 ) = 2.040200 , 0.990 % error
ln(2) + ( ln(1.01) x 4 )  = No error
ln(2) + ( ln(1.01) x 5 )  = 1 error
exp( 7.428988348E-01 ) = 2.081208 , 0.990 % error
ln(2) + ( ln(1.01) x 6 )  = No error
ln(2) + ( ln(1.01) x 7 )  = No error
ln(2) + ( ln(1.01) x 8 )  = No error
ln(2) + ( ln(1.01) x 9 )  = No error
-------------------------------
ln(10) + ( ln(1.01) x 1 )  = No error
ln(10) + ( ln(1.01) x 2 )  = No error
ln(10) + ( ln(1.01) x 3 )  = No error
ln(10) + ( ln(1.01) x 4 )  = No error
ln(10) + ( ln(1.01) x 5 )  = No error
ln(10) + ( ln(1.01) x 6 )  = No error
ln(10) + ( ln(1.01) x 7 )  = No error
ln(10) + ( ln(1.01) x 8 )  = No error
ln(10) + ( ln(1.01) x 9 )  = No error
-------------------------------
Although Ln(2.02) is not a constant used in the HP35,
let us look for bugs anyway.

ln(2.02) = 1 error
exp( 7.030975114E-01 ) = 2.000000 , 0.990 % error
ln(2.02) + ( ln(1.01) x 1 )  = No error
ln(2.02) + ( ln(1.01) x 2 )  = 1 error
exp( 7.229981731E-01 ) = 2.040200 , 0.990 % error
ln(2.02) + ( ln(1.01) x 3 )  = No error
ln(2.02) + ( ln(1.01) x 4 )  = 1 error
exp( 7.428988348E-01 ) = 2.081208 , 0.990 % error
ln(2.02) + ( ln(1.01) x 5 )  = No error
ln(2.02) + ( ln(1.01) x 6 )  = No error
ln(2.02) + ( ln(1.01) x 7 )  = No error
ln(2.02) + ( ln(1.01) x 8 )  = No error
ln(2.02) + ( ln(1.01) x 9 )  = No error
-------------------------------

If we take the Ln(2.02) errors,
we see they are symmetrical with the Ln(2) errors.

ln(2.02)
exp( 7.030975114E-01 ) = 2.000000 , 0.990 % error
is equivalent to:
ln(2) + ( ln(1.01) x 1 )
exp( 7.030975114E-01 ) = 2.000000 , 0.990 % error

ln(2.02) + ( ln(1.01) x 2 )
exp( 7.229981731E-01 ) = 2.040200 , 0.990 % error
is equivalent to:
ln(2) + ( ln(1.01) x 3 )
exp( 7.229981731E-01 ) = 2.040200 , 0.990 % error

ln(2.02) + ( ln(1.01) x 4 )
exp( 7.428988348E-01 ) = 2.081208 , 0.990 % error
is equivalent to:
ln(2) + ( ln(1.01) x 5 )
exp( 7.428988348E-01 ) = 2.081208 , 0.990 % error

I think we can conclude, that HP should have expressed their
HP35 Errata in terms of Ln(1.01) , Ln(1.1) and LN(2).

We can also see from above, that not ALL values of
LN(1.01) k = 1 to 9 produce errors with LN(1.1) and LN(2).

Although I am reasonably sure the above list of exp(X) errors
is complete, not all are symmetrical with the expression exp(ln(X))

I think the full list in this form of original HP35 errors would be:

exp(ln(1.0201))

exp(ln(1.04060401))

exp(ln(1.12211))

exp(ln(2.02))

exp(ln(2.060602))

Regards, Geoff Hitchcox (Christchurch, New Zealand).