HP 35S --- 2*2 lin. solve bug



#2

It appears that registers G...L are used internally in the 2*2 lin. solve in an unusual way. If there is anything other than a real number in these registers (a complex number or a vector) the linear solver returns "no solution." Kind of interesting, as these registers are not overwritten after using the linear solver, which appears to indicate that these registers are not actually used.

Another one for the bug-list. I haven't checked the 3*3 lin. solve function. Does anyone have an idea how such an unusual behaviour might occur?


#3

Quote:
Does anyone have an idea how such an unusual behaviour might occur?
Yes, by careless programming.

HP: Please replace the 35s by an emulator of the 32SII/42S/15C or similar. It's not about having a bug or two, it's about having more bugs anyone could ever remeber. This machine kills your reputation in providing reliable tools.


#4

Quote:
The [original] HP-35 had numerical algorithms that exceeded the precision of most mainframe computers at the time. During development, Dave Cochran, who was in charge of the algorithms, tried to use a Burroughs B5500 to validate the results of the HP-35 but instead found too little precision in the former to continue. IBM mainframes also didn't measure up. This forced time-consuming manual comparisons of results to mathematical tables. A few bugs got through this process. For example: 2.02 ln ex resulted in 2 rather than 2.02. When the bug was discovered, HP had already sold 25,000 units which was a huge volume for the company. In a meeting, Dave Packard asked what they were going to do about the units already in the field and someone in the crowd said "Don't tell?" At this Packard's pencil snapped and he said: "Who said that? We're going to tell everyone and offer them a replacement. It would be better to never make a dime of profit than to have a product out there with a problem."

From hp museum's HP-35 page.


#5

Yes, this story is often quoted. Many people who bought the HP 35 kept their buggy calculators rather than exchange for a new, bug free one :-)

#6

My first idea was that the 35s program used a methodology somewhat like that in the "Solution of Simultaneous Equations" program on pages 15-12 through 15-20 of the hp 33s use's guide which solves the 2x2 case by placing zeroes and a one in appropriate positions of the 3x3 solver. But some testing tells me that doesn't seem to be true.

The 3x3 equation seems to work properly even if a vector or a complex number is stored somewhere in registers M through Z. But, neither the 2x2 nor the 3x3 equation will solve with complex number inputs, even though the following comment from page 9-7 of the HP35s User's Guide would seem to indicate that it should:

Quote:
When you evaluate an equation and are prompted for variable values, you may enter complex numbers.

So, I conclude that the programmer recognized that his programs would not work with complex numbers and included a trap to alert a user of an unacceptable input, which resulted in a failure of the 2x2 solution if there was a leftover complex number in registers G theough L.

Strange stuff indeed.

Edited: 17 Jan 2010, 9:43 p.m.


#7

Thanks for your replies.

Quote:
So, I conclude that the programmer recognized that his programs would not work with complex numbers and included a trap to alert a user of an unacceptable input, which resulted in a failure of the 2x2 solution if there was a leftover complex number in registers G theough L.

Why would a programmer consciously reduce the functionality of the calculator? Surely, it would be easy to include an error check and actually give a useful error message.

I could explain it in terms of messy programming: use the non-real parts of some of the registers (i.e. the imaginary parts of registers G...L or the parts that store the second or third components of any vector in registers G ... L ) as working memory. Alternatively, the processor has a strange way of allocating memory to the non-real parts of any register, such that it could interfere with some internal working memory (which I assume the processor has.) Either way, a bug it is.

I already saw this bug appeared on Paul Dale's HP-35S bug list - this forum is remarkably active!


#8

Abusing apparently free space has some tradition. Some Motorola 68000 programs failed on 32-bit versions of this CPU due to programmers used bits 24 to 31 of its address registers for their own purpose.

#9

I added it right away.

- Pauli

#10

Whatever the source of the problem is if the user encounters it he can easily bypass it by simply entering a real number in memories G through L. That doesn't seem to be an overwhelming situation.


#11

Quote:
Whatever the source of the problem is if the user encounters it he can easily bypass it by simply entering a real number in memories G through L. That doesn't seem to be an overwhelming situation.

And I think Maarten agrees with you, he said:
Quote:
Kind of interesting,...

And was probably just wondering what others thought could cause this:
Quote:
Does anyone have an idea how such an unusual behaviour might occur?

However, it is a bug nevertheless, and does add to the perception that the code and algorithms were not tested properly. I certainly would not trust this model on a space mission (should I ever find myself lucky enough to be an astronaut :-) )

#12

Right, it was me who (again) complained about the countless bugs. Problem is, when you find 10 bugs soon, there are likely many more. And you have to remember each of them in any situation. I can't and I don't feel like HPs beta tester.

I won't use the 35s for any professional task involving health or money, and I wouldn't like to see anyone using such a machine in my company.


#13

Bart (UK) is right; I was just interested to see if anyone had an idea how such a bug might come about.

And Thomas:

Quote:
I won't use the 35s for any professional task involving health or money, and I wouldn't like to see anyone using such a machine in my company.

That all depends whether you believe the 35s is any worse than other models by other manufacturers. I am not so sure.

I still highly recommend this model for anyone out there: it is the best RPN scientific that HP has on offer - in case you hadn't noticed: HP stopped selling the 42s quite a while ago, so that is not a realistic option, however much I'd like to have a 42s (did you all notice that the form factor of the 20b and 30b is precisely the same as the 42s? Surely a sign that the 42s will be reborn soon!)

Let's compare the 35s with the somewhat ridiculous scientifics that most of my students now use: the number of errors they make when typing in equations far outweigh the small chance to hit on a bug in the 35s. I'd recommend a proper RPN calculator anytime above any of those calculators.


#14

Yes Maarten, nothing to say about using it in education. Students will love to find any bugs. You bet, I was happy about every error I found in the Bronstein-Semendjajew back in the 80th :-D.

I don't compare it with any calculator out there as I don't know any current model intimately. But I do compare it with the 32SII and know what others have to say about the 15C and 42S models. It cannot be that more recent products are actually worser when it comes to calculations.

What I'm missing on the 35s package is one of the usual HP stickers, saying "not for professional use." ;-)

About the rebirth of a 42S model I share what others said: It won't happen since there's no market. And the 30b seems not to be a good platform due to the limited LCD and memory. But maybe Thomas Okken can say something about that :^).

#15

Quote:
However, it is a bug nevertheless, and does add to the perception that the code and algorithms were not tested properly.

If we accept the idea that the code and algorithms were not tested properly shouldn't we ask why? I suggest that one of the reasons was a desire to release the machine as a part of the celebration of the 35th anniversary of the original HP-35.

#16

So HP didn't release the machine because they thought there was a need for it and they were going to fill that hole, but to pat themselves on the back for a good job done 35 years prior?

And not even to make money, but just to have some souvenirs for the show, ie, it was a total marketing event!

That would explain it all! Marketing designed and tested the machine! (It does LOOK good, sitting on the desk I'd say!!!)


#17

Quote:
And not even to make money, but just to have some souvenirs for the show, ie, it was a total marketing event!

The problem is that the 33s is the only other HP offering of that type and is no longer for sale in the UK! (Interestingly it is in the US)
#18

Quote:
I suggest that one of the reasons was a desire to release the machine as a part of the celebration of the 35th anniversary of the original HP-35.

i.e. you're suggesting it was rushed with minimal testing to make it on time for the 35th anniversary of the original HP-35?

#19

Quote:
i.e. you're suggesting it was rushed with minimal testing to make it on time for the 35th anniversary of the original HP-35?

Go to the thread "HP-35/35th Anniversary Edition expected soon" near the bottom of Archive 17 at http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv017.cgi?read=111916 to get a feel for the excitement over the anticipation of a 35th anniversary machine.

Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime graphing bug BruceH 1 292 11-19-2013, 08:14 AM
Last Post: Joe Horn
  HP Prime - another cosmetic bug BruceH 3 362 11-12-2013, 02:18 PM
Last Post: Ken Shaw
  XCas / Prime "solve" question Nigel J Dowrick 4 401 11-08-2013, 04:01 AM
Last Post: Nigel J Dowrick
  Using the Prime to solve for eigenvalues Michael de Estrada 28 1,739 10-27-2013, 07:21 AM
Last Post: Tarcisi C
  HP Prime Define: Use with solve, etc. Helge Gabert 0 191 10-23-2013, 06:24 PM
Last Post: Helge Gabert
  HP Prime Bug bluesun08 19 1,146 10-14-2013, 10:48 PM
Last Post: Han
  HP 34s solve f'(x)=0 Richard Berler 8 460 10-07-2013, 03:03 PM
Last Post: Dieter
  HP Prime bug in EDITMAT Han 7 579 09-27-2013, 10:15 AM
Last Post: Han
  Good puzzle for kids to solve on 35s? snaggs 11 733 09-18-2013, 10:40 PM
Last Post: David Hayden
  September SOLVE Newsletter Robert Prosperi 4 371 09-07-2013, 01:12 AM
Last Post: Mic

Forum Jump: