TI59 Diagnostic forensics
07-26-2020, 06:47 PM (This post was last modified: 07-26-2020 07:14 PM by Pjwum.)
Post: #1
 Pjwum Member Posts: 58 Joined: Jan 2018
TI59 Diagnostic forensics
In a recent Thread member twoweims asked for a source for TI59 magnetic cards. During the discussion he mentioned a Diagnostic routine which is included in the US marketed version but not in Europe. Twoweims was so kind to send me a copy of the Diagnostic card.

Basically it calculates the error of some seemingly arbitrary functions:

error = pol(rec(5 < 30)) - \sqrt{896 + 4} + \frac{\pi^2-fp(\pi^2)}{3^2}-1

then checks if this error is within a certain limit:

error \cdot 10^{10} < 1 ?

The TI59 calculates 0.7 and signals an ok.

I was curious how other calcs of the same vintage would respond to this task. A 41CV and a 33C both showed an error of zero. But also both have less internal precision (10 digits) than the TI (12 digits). But the same calculation with a 48G and a 42s (12 digits) also resulted in an exact zero. Good job, HP.

The other facets of the Diagnostic card are:
- reading the card tests I/O-chip, amplifier-chip, magnetic head coils and mechanics
- maximizing the programme by inserting lots of zero-steps and adressing the lowest and highest storage register tests the RAM-chip

Patrick
07-27-2020, 01:15 AM
Post: #2
 johanw Member Posts: 167 Joined: Nov 2019
RE: TI59 Diagnostic forensics
(07-26-2020 06:47 PM)Pjwum Wrote:  Basically it calculates the error of some seemingly arbitrary functions:

error = pol(rec(5 < 30)) - \sqrt{896 + 4} + \frac{\pi^2-fp(\pi^2)}{3^2}-1
Sorry about my lack of understanding, I assume the < is a separator between radius and angle, but what do f and p stand for here?
07-27-2020, 02:20 AM (This post was last modified: 07-27-2020 02:35 AM by rprosperi.)
Post: #3
 rprosperi Super Moderator Posts: 5,190 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-27-2020 01:15 AM)johanw Wrote:
(07-26-2020 06:47 PM)Pjwum Wrote:  Basically it calculates the error of some seemingly arbitrary functions:

error = pol(rec(5 < 30)) - \sqrt{896 + 4} + \frac{\pi^2-fp(\pi^2)}{3^2}-1
Sorry about my lack of understanding, I assume the < is a separator between radius and angle, but what do f and p stand for here?

I was briefly puzzled too about that, but later realized it must be the fractional part function. If you examine the components in the formula, it's all about verifying things aren't rounding incorrectly, so PI^2 - fp(PI^2) should be 9.

--Bob Prosperi
Post: #4
 Paul Berger (Canada) Senior Member Posts: 533 Joined: Dec 2013
RE: TI59 Diagnostic forensics
fp would appear to be fractional part.

My manual indicates it should end with -.8888888888 which is what I get on my 59

The formula posted does not appear to be complete at least not for my diag card I have listed the program and will see if I can figure out the differences, but not right now.

Edit: the additional step I saw in the trace are the steps to calculate the limit as per original post.

Paul.
07-27-2020, 11:18 AM
Post: #5
 Maximilian Hohmann Senior Member Posts: 960 Joined: Dec 2013
RE: TI59 Diagnostic forensics
Hello!

Very interesting. My Ti59 (bought new in 1978...) did not come with that card.

What I fail to understand however is why such a complicated calculation must be done to check if the calculator is working. It does not have a seperate floating point unit as far as I know, just a single CPU. So if it is able to come up with the correct result for "1+1" it should be good for everything else, shouldn't it?

Regards
Max
07-27-2020, 02:13 PM
Post: #6
 Paul Berger (Canada) Senior Member Posts: 533 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-27-2020 11:18 AM)Maximilian Hohmann Wrote:  Hello!

Very interesting. My Ti59 (bought new in 1978...) did not come with that card.

What I fail to understand however is why such a complicated calculation must be done to check if the calculator is working. It does not have a seperate floating point unit as far as I know, just a single CPU. So if it is able to come up with the correct result for "1+1" it should be good for everything else, shouldn't it?

Regards
Max

It was noted above that the diagnostic card was not shipped with Ti59s sold in Europe for some reason.

With regard to the "complicated calculation" the same could be said for the HP 67/97 diagnostic program, but in both the HP and TI calculators the test check a lot more than just the processor. Just loading the card tests the card reader and associated electronics, and the execution of the program would test some of the program memory, in the case of the 67/97 test all of it since the program just fits the available program memory, and ROMs since to carry out the functions called by the program would require accessing routines in ROM. It is even a basic display test since it ends displaying a bunch of 8s.

Paul.
07-27-2020, 03:51 PM (This post was last modified: 07-27-2020 04:18 PM by Pjwum.)
Post: #7
 Pjwum Member Posts: 58 Joined: Jan 2018
RE: TI59 Diagnostic forensics
Some clarifications:

- fp() means fractional part
- 5<30 stands for the polar notation of length 5 and 30 degrees (didn't find the suitable TeX-command). The TI will drop the 5 and only use 30 as a number in the subsequent subtraction.
- the program has only a few steps but occupies the beginning and the end of the program area by inserting a lot of empty commands; together with its adressing the lowest and highest storage registers the RAM might be sufficiently tested
- yes, the Diagnostic card is described in the English manual but not in the German version; the card was also not part of the German package.
- concerning the formula, I guess basic operations could be done in the CPU, the TMC0501. For trigonometry as needed in polar conversions it will access lookup tables (and of course the value of pi) in the ROM- chip.

As far as I could see the trigonometric calculation in pol(rec(5 <30)) produced a small inaccuracy of 0.00000000007.

I don't have an HP67, the rightous foe. Is there anyone who could do the test?
07-27-2020, 03:57 PM
Post: #8
 Pjwum Member Posts: 58 Joined: Jan 2018
RE: TI59 Diagnostic forensics

If the diagnostic tests an error < 1 the program fills the display with -.888888888 and stops. Otherwise it divides by zero which produces a blinking 1.
07-27-2020, 09:35 PM
Post: #9
 pinkman Senior Member Posts: 403 Joined: Mar 2018
RE: TI59 Diagnostic forensics
(07-27-2020 11:18 AM)Maximilian Hohmann Wrote:  Hello!

Very interesting. My Ti59 (bought new in 1978...) did not come with that card.

What I fail to understand however is why such a complicated calculation must be done to check if the calculator is working. It does not have a seperate floating point unit as far as I know, just a single CPU. So if it is able to come up with the correct result for "1+1" it should be good for everything else, shouldn't it?

Regards
Max

As said above, it seems to test more than just the CPU health.
But if I was mandated to create a test program for a calculator during the 70´s I for sure would try to run all the parts of the ROM or the CPU, not only “CPU OK, ROM OK”.
And this one seems to be very clever (the 8s, the memory full of NOP codes, ...).

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
07-27-2020, 09:51 PM (This post was last modified: 07-29-2020 02:59 AM by rprosperi.)
Post: #10
 rprosperi Super Moderator Posts: 5,190 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-27-2020 03:51 PM)Pjwum Wrote:  I don't have an HP67, the rightous foe. Is there anyone who could do the test?

The 67 returns 1.2692E-04.
Edit: Actual result is 0.00 - details below

Not surprisingly, the error comes from the first pair of terms (REC(POL(theta,r)).

I used DEG mode and all the actual functions as built in the 67 (so, e.g. I used [3] [X^2] rather than [3] [ENTER] [*] ).

So, far more accurate than the TI, but not nearly as good a result for testing the LEDs. Clever, clever those guys were, and no doubt tried a lot of formulas to come up with that result. Cool!

--Bob Prosperi
07-27-2020, 09:53 PM
Post: #11
 Paul Berger (Canada) Senior Member Posts: 533 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-27-2020 03:51 PM)Pjwum Wrote:  Some clarifications:

- fp() means fractional part
- 5<30 stands for the polar notation of length 5 and 30 degrees (didn't find the suitable TeX-command). The TI will drop the 5 and only use 30 as a number in the subsequent subtraction.
- the program has only a few steps but occupies the beginning and the end of the program area by inserting a lot of empty commands; together with its adressing the lowest and highest storage registers the RAM might be sufficiently tested
- yes, the Diagnostic card is described in the English manual but not in the German version; the card was also not part of the German package.
- concerning the formula, I guess basic operations could be done in the CPU, the TMC0501. For trigonometry as needed in polar conversions it will access lookup tables (and of course the value of pi) in the ROM- chip.

As far as I could see the trigonometric calculation in pol(rec(5 <30)) produced a small inaccuracy of 0.00000000007.

I don't have an HP67, the rightous foe. Is there anyone who could do the test?

For the part P->R and R->P then subtract 30 a 67 return 0 which seems to be the part of the formula that returns the error, however the 67 only display 9 digits after the decimal point.

Paul.
07-28-2020, 10:09 AM
Post: #12
 Werner Senior Member Posts: 685 Joined: Dec 2013
RE: TI59 Diagnostic forensics
RCL59 on iOS, which, as far as I know, is an emulator, not a simulator, returns 0 for (in Deg mode):
Code:
 5 x<>t 30  2nd P->R  INV 2nd P->R  - 30 =
and, as a result, also for the whole formula?
Werner
07-28-2020, 12:51 PM
Post: #13
 rprosperi Super Moderator Posts: 5,190 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-28-2020 10:09 AM)Werner Wrote:  RCL59 on iOS, which, as far as I know, is an emulator, not a simulator, returns 0 for (in Deg mode):
Code:
 5 x<>t 30  2nd P->R  INV 2nd P->R  - 30 =
and, as a result, also for the whole formula?
Werner

Which very likely shows that it's a simulator and not an emulator after all...

--Bob Prosperi
07-28-2020, 01:13 PM
Post: #14
 Werner Senior Member Posts: 685 Joined: Dec 2013
RE: TI59 Diagnostic forensics
Yes, indeed. 'Faithful recreation' it says in the About text.
Werner
07-28-2020, 04:31 PM
Post: #15
 rprosperi Super Moderator Posts: 5,190 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-28-2020 01:13 PM)Werner Wrote:  Yes, indeed. 'Faithful recreation' it says in the About text.
Werner

Good to know! I've run the numbers 3 more times on my 67 just be sure.

Thanks!

--Bob Prosperi
07-28-2020, 04:47 PM
Post: #16
 Paul Berger (Canada) Senior Member Posts: 533 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-27-2020 09:51 PM)rprosperi Wrote:
(07-27-2020 03:51 PM)Pjwum Wrote:  I don't have an HP67, the rightous foe. Is there anyone who could do the test?

The 67 returns 1.2692E-04.

Not surprisingly, the error comes from the first pair of terms (REC(POL(theta,r)).

I used DEG mode and all the actual functions as built in the 67 (so, e.g. I used [3] [X^2] rather than [3] [ENTER] [*] ).

So, far more accurate than the TI, but not nearly as good a result for testing the LEDs. Clever, clever those guys were, and no doubt tried a lot of formulas to come up with that result. Cool!

How did you get that result on a 67? I have tried a few times now and always end up with 0

Paul.
07-28-2020, 05:17 PM (This post was last modified: 07-28-2020 05:47 PM by Pjwum.)
Post: #17
 Pjwum Member Posts: 58 Joined: Jan 2018
RE: TI59 Diagnostic forensics
(07-27-2020 09:51 PM)rprosperi Wrote:  So, far more accurate than the TI, but not nearly as good a result for testing the LEDs. Clever, clever those guys were, and no doubt tried a lot of formulas to come up with that result. Cool!

Yes, smart engineers. If the error tests < 1 they simply put 9 on the display, invert it and multiply by 8, no magic here :-)
07-28-2020, 05:43 PM
Post: #18
 Pjwum Member Posts: 58 Joined: Jan 2018
RE: TI59 Diagnostic forensics
(07-27-2020 09:51 PM)rprosperi Wrote:  The 67 returns 1.2692E-04.

Not surprisingly, the error comes from the first pair of terms (REC(POL(theta,r)).

I used DEG mode and all the actual functions as built in the 67 (so, e.g. I used [3] [X^2] rather than [3] [ENTER] [*] ).

Is 1.2692E-04 already the result after multiplication by 1E10? I ask because this would imply an internal precision of 18 digits for the HP.
07-28-2020, 06:55 PM (This post was last modified: 07-28-2020 10:10 PM by rprosperi.)
Post: #19
 rprosperi Super Moderator Posts: 5,190 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-28-2020 04:47 PM)Paul Berger (Canada) Wrote:  How did you get that result on a 67? I have tried a few times now and always end up with 0

Paul.

Keystrokes: (edited to correct goofy error)

Code:
30 [ENTER] 5 [f] [R<-] [g] [->P] [g] [X<>Y] 896 [ENTER] 4 + [f][SqRoot] -                  <========= display shows 0.00 [h] [Pi] [g] [X^2] [h]              \ [Pi]             | [g]              | Could all be replaced by [ENTER], depending on your desired purity [X^2]            / [g] [FRAC] - 3 [g] [X^2] [/] [+] 1 [-]

Edit: Noted possible substitution to simplify

Also note: Correct result is 0 - (when you use the right keystrokes... )

--Bob Prosperi
07-28-2020, 07:01 PM
Post: #20
 rprosperi Super Moderator Posts: 5,190 Joined: Dec 2013
RE: TI59 Diagnostic forensics
(07-28-2020 05:43 PM)Pjwum Wrote:
(07-27-2020 09:51 PM)rprosperi Wrote:  The 67 returns 1.2692E-04.

Not surprisingly, the error comes from the first pair of terms (REC(POL(theta,r)).

I used DEG mode and all the actual functions as built in the 67 (so, e.g. I used [3] [X^2] rather than [3] [ENTER] [*] ).

Is 1.2692E-04 already the result after multiplication by 1E10? I ask because this would imply an internal precision of 18 digits for the HP.

I'm not sure which multiplication by 1E10 you are referring to.

See the post just above to see the exact keystrokes and when this value appears.

Actually of course after POL(REC(30,5)), X contains 30.00012692.

I believe the 67 uses 15 internal digits, as do all Woodstocks.

--Bob Prosperi
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)