The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

HP33s another bug?
Message #1 Posted by JuanMi on 14 Aug 2004, 11:18 a.m.

Hi!,

Please, try to calculate on your HP33s: 3º30' - 2º58' on my HP33s the response is: 31'60" !!!!!!!!

Instead of 32" (that is: 0.32) you get an incredible 31 minutes and 60 seconds!!!!!!!!.

Here is how I proceed (in case I'm doing something wrong):

I type:

3.3 <- HR >3.5000 --- This is ok

2.58 <- HR >2.9667 --- This also OK

- (subtract key)

>0,5333 --- Also OK

and then:

->HMS >0.3160 !!!!!!!!!!

Of course, Im working on Degrees...

Does this also happens to you?.

Greetings from Spain!

JuanMi

      
Re: HP33s another bug?
Message #2 Posted by Andrés C. Rodríguez (Argentina) on 14 Aug 2004, 11:36 a.m.,
in response to message #1 by JuanMi

While this is very frustrating and even irritating; it should be noted that the answer given by the 33S is really 0.31599999999 which, even in FIX 11 display mode shows as 0.31600000000 . Using SCI 11 doesn't help in this case. You can check this by multiplying the answer by, say, 1E10.

As the calculator isn't aware that we intend this number to "be degrees", it merely uses the same rounding format as for any other number.

Hence, I think that the display value of 0.3160 is not a bug on itself... but... Why are the internal guard digits (in the H.MS and HR conversions) not helping to give a better answer? Or are the guard digits a cause of this behavior?

I don't have my other HPs at hand, so to check the same case in HP41C, HP42S, etc.

Edited: 14 Aug 2004, 11:40 a.m.

            
Re: HP33s another bug?
Message #3 Posted by JuanMi on 14 Aug 2004, 11:48 a.m.,
in response to message #2 by Andrés C. Rodríguez (Argentina)

Hola Andrés,

Voy a pasar a inglés por si "las moscas" :).

Thank you for your quick answer and explanation, altough, I still think that displaying 31'60" instead of 32" is a bug or malfunction or whatever, just because such "number" can't exist.

I know what you mean, but this so called "bug" creates the need to be aware on every complex number calculation in order to understand what "the calculator" means. So, when Hp33s says 0º31'60" it really means 0º32'00"... as you can imagine... that's horrible...

Even the cheapest casio does it well... :(

What new surprises will be coming from HP33s?... :)

Un abrazo,

JuanMi

                  
Re: HP33s another bug?
Message #4 Posted by John on 14 Aug 2004, 12:05 p.m.,
in response to message #3 by JuanMi

This type of problem has been around for years. Some of our favorite HP's have problems at times displaying HMS values.

I don't think THIS particular issue is a problem to get too worked up about.

Some of the other issues that have been reported are more serious.

Hope HP is paying attention to those.

John

                  
Re: HP33s another bug?
Message #5 Posted by Andrés C. Rodríguez (Argentina) on 14 Aug 2004, 3:54 p.m.,
in response to message #3 by JuanMi

JuanMi: Hola!!

To avoid such "0.3160" angles, just use decimal degrees all the time; use =>HR to convert input values that appear in H.M'S" format, and do it *before* working with them. Then use =>H.MS just to convert the final result, if you please. Or, harder but better, always use radians!

True: even the cheapest ***** do it better ... and so does the cheap, algebraic HP30S. They have an explicit D.M'S" mode; but RPN HPs don´t have such mode... and the 33S pretends to belong to this last group.

            
Re: HP33s another bug?
Message #6 Posted by John Limpert on 14 Aug 2004, 6:06 p.m.,
in response to message #2 by Andrés C. Rodríguez (Argentina)

I get the same result (0.3160) on my HP-38G when the display is set to Fixed 4. Setting the display to Standard results in .315999999999.

            
Of HMS conversions, Casio vs. HP
Message #7 Posted by Karl Schneider on 14 Aug 2004, 6:55 p.m.,
in response to message #2 by Andrés C. Rodríguez (Argentina)

This thread is going in various directions, but some people are on the right track.

Yes, Casios -- even my 1981 fx-3600P -- got those HMS <-> HR conversions right. It's one of the things Casio has been doing better than HP for years (others being: fraction arithmetic, ENG display mode and statistical functions).

The reason for the imperfect "0.3160" is that the calculated decimal difference of 0.533333... rounded to internal accuracy is still just slightly less than 16/30 = 32/60. 0.3159999999... is calculated and up-rounded to 0.3160... for display, but the 60 seconds is not coverted to 1 full minute. This might be by HP's choice, so as not to alter the calculation results.

I obtained your result on the 33S and every HP I've tried so far, when the two HR<->HMS conversion functions are used for this problem. (This includes the "->HMS" and "HMS->" functions on the RPL calc's (28/48/49).

However, on the 42S and the RPL calcs, the "HMS-" function can be applied to obtain the proper answer. Unfortunately, 3.3 ENTER 2.58 "HMS-" on the HP41C/V/X yields the imperfect answer of 0.3160.

Try "3.3 HR 2.56 HR - HMS". You'll get 0.3400 (34 minutes), because the value calculated by the subtraction > 17/30.

                  
Re: Of HMS conversions, Casio vs. HP
Message #8 Posted by JuanMi on 14 Aug 2004, 9:27 p.m.,
in response to message #7 by Karl Schneider

Hallo Karl,

Vielen Dank für deine Antwort. The explanation you exposed, seems very clear to me. I also own some old HP's and I encourage you to do the same calculation on a HP20S. For 3º30' - 2º58' the result you will get is: 3.16E-1 !!!!!

It is really frustrating...

I'm actually studying for a nautical title and I have to work a lot with such complex numbers operations. As you can realize, my confidence on HP calculators (just for this purpose) has decayed a lot... :(

My HP49g+ performs well these calculations but this model is not allowed on exams :).

So, thank you again for your kind explanation.

MfG,

JuanMi

                        
Re: Of HMS conversions, Casio vs. HP
Message #9 Posted by Karl Schneider on 15 Aug 2004, 3:29 a.m.,
in response to message #8 by JuanMi

Juan --

Thanks for the complent (and expression in German!)

I do also have a 20S, which was one of the units I tried when posting the answer. Your 20S was apparently in SCI display mode, which is why 3.16E-1 (= 3.16 x 10^1) was displayed instead of 0.3160.

Remember, 0.3160 (= "31 minutes and 60 seconds") is not wrong; it's just not formatted in the best manner.

A recent thread in this Forum (to which I also posted some analysis) has revealed that the HP-33S sometimes returns numerically incorrect results for ->HMS conversions. This is not a problem with the HP-designed calc's, including the HP-32SII upon which the 33S was based.

                        
Re: Of HMS conversions, Casio vs. HP
Message #10 Posted by bill platt on 15 Aug 2004, 10:47 p.m.,
in response to message #8 by JuanMi

Hi JuanMi,

I used an 11c for many years--starting when they first came out. I thought the H.ms representation was very clever--as it made possible a robust form of input-output, and programming. And at the time, 1982, there really weren't any "fancy" forms of representation available on calculators (except the 41c).

I am a sailor, and used my calculator for navigational purposes--and although the 60 minutes (or sometimes 60 seconds) representation may be disconcerting the first time you see it, it really is not bad when you realize why it is happening--it allows you to be aware of the slight computationsal bias which occurs in numerical approximations. It is in fact a robust system.

But I will also note that from a nautical standpoint, the H.ms / H conversion is really not correct or useful anyway--as in my experience, Degrees, Minutes.decimal minutes are much more common---universal even.

But, this is where the keystroke programming shines--and even the built-in function h.ms using the decimal as a divider. It is very easy to write a robust program to handle degrees minutes.decimal minutes--either using the built-in as an intermediate in your program or not.

Best regards,

Bill

                              
Re: Of HMS conversions, Casio vs. HP
Message #11 Posted by Veli-Pekka Nousiainen on 16 Aug 2004, 1:46 a.m.,
in response to message #10 by bill platt

Hi, Bill!
Could you please give some examples?
both ways in HP4x RPL and HP3x RPN
Thank you, VPN

                                    
Re: Of HMS conversions, Casio vs. HP
Message #12 Posted by bill platt on 16 Aug 2004, 2:24 a.m.,
in response to message #11 by Veli-Pekka Nousiainen

The easiest program utilizes both x and y registers of the stack, as follows.

Take input (from a chart) as D.mdecmin, e.g. 72 
degrees 13.6 minutes west, 
40 degrees 7.2 minutes north

{input is to y-register in stack for degrees, followed by ENTER, followed by minutes.decimal minutes

GSB A will process this input to decimal degrees

LBL A 60 / + RTN

And converting from decimal Degrees back to Degrees and Decimal minutes is a trival reversing.

To preserve more of stack contents, and use only one layer, take input as Degrees.MMdecmin.....

LBL 7 sto 1 FP 100 X 60 / RCL 1 IP + RTN {output is decimal degrees}

And the Other Way around:

LBL 4 STO 2 FP 60 X 100 / RCL 2 IP + RTN {output Degrees.MMdecimalminutes}

Edited: 16 Aug 2004, 3:06 a.m.

                              
Re: Of HMS conversions, Casio vs. HP
Message #13 Posted by JuanMi on 16 Aug 2004, 7:34 a.m.,
in response to message #10 by bill platt

Hi Bill!

Thank you very much for your comments. As you stated, 31'60" it is not a faulty precision of the calculator. It is just a "cosmetic" problem.

Also, as you told, the most common lat/lon coordinates format is the decimal of minutes. You can try to type a let's say, 42º 16.3' (or whatever) on a late model casio, and it will return the correct HMS value (in this case 42º16'18", but of course, it can not "translate" to the original format. The standar HP format (DD.MMSS doesn't permit it... :( ).

But in my case, doing dead-reckoning calculations, that "semi decimal" format is not so relevant, as we reduce most of results to minutes (for instance, delta-latitudes mean-latitudes, etc). Then, (again) with a casio, you can directly add, let's say 0º132'0" to a coordinate, and the calculator will correctly convert it to 2º12' and add it, offering the result directly on a HMS format.

I am not a casio fan!!! (I own and USE a HP97, 41CV, 20S, 48GX, 49G+, 10B, 17BII, 18C among other old TI's) but in my honest opinion, their way of handling HMS numbers, is by far much easier than my loved HP's.

Many thanks again for your comments, and have a good sailing!!!

Juan Miguel

                  
Re: Of HMS conversions, Casio vs. HP
Message #14 Posted by rsenzer on 15 Aug 2004, 11:22 p.m.,
in response to message #7 by Karl Schneider

I don't know the underlying logic of the CASIO and related algebraic calculators, but I wonder if they are actually recognizing the D.MS representation as a distinct data type or object.

There is another degree related operation that is also handled better on these calculators vs. the classic HPs. On one of these calculators, you can use a "degree marker" for angles independently of the current angular mode.

On the CASIO type scientific calculators, this is available through the "DRG>" key. This does not actually change the mode, but does add a suffix marker corresponding to your selection, that is "raised o" for degrees, "raised r" for radians, or "raised g" for grads. On the HP-30S and TI-30XII, this can be accessed by the "DMS" or related key. The effect, in either case, is like attaching the "degree unit" following the number on the 48 series. This capability is also available on the TI graphing calculators as well, although it is not a unit per se.

Such markers are convenient because there is no need to be concerned about the current angle setting if the marker is employed.

[I carry a Tozai ATC-763 (from Walgreens) in my pocket. It is roughly equivalent to a Casio 300, but without an algebraic history stack. It uses the same binary representation/accuracy as the HP 30S, but is easily small enough to carry in a pocket. Still use HPs, but they don't fit as easily into my pocket.]

                        
Tozai / Karce
Message #15 Posted by bill platt on 15 Aug 2004, 11:37 p.m.,
in response to message #14 by rsenzer

http://www.karceindonesia.com/scientific4.htm#kc186

Does the 186 look like the Tozai you mentioned?

                              
Yes -- NT
Message #16 Posted by rsenzer on 16 Aug 2004, 8:53 a.m.,
in response to message #15 by bill platt

            
HP calculators don't handle 'true' HMS representation
Message #17 Posted by Vieira, Luiz C. (Brazil) on 15 Aug 2004, 2:37 p.m.,
in response to message #2 by Andrés C. Rodríguez (Argentina)

Hi Andrés, Juan, all;

Andrés, you touched a very sensitive point: HMS true representation.

I remember seeing many other calculators with [º'"] key, not available in most HP calculators, that would allow HMS to be entered "as is". Almost all HP calculators (if not all "true" HP-designed calculators) and almost all TI till the 90's take a decimal number in the display and return a decimal number to the display, they never take an HMS representation and return another HMS representation. So, Juan Miguel, .316000... is .316000... and it is correct, but the calculator does not "see" .316000... as if it is 0º31'60", what is actually 'wrong' (not much wrong, maybe). And again Andrés shows the "backstage" of the actual number: .3159999... This number correctly rounds to .316000..., because the calculator does not recognize an HMS representation. This would never happen with an HP30S or an HP9G, because these newer "HP" calculators can handle these figures the way Casio and others do.

A related situation can be found with the HP12C and some others (HP41CX, HP48/49 series) when dealing with dates and date representation. When you key in 4.022004 in any calculator, this is only 4.022004. But if you want any of the calculators above to handle this number as a date, check if the calculator is set to D.MY or M.DY (all of them do that) prior to use 4.022004, because the calculator can take it as February, 4th. 2004 or April, 2nd. 2004. But, hey! This is just a number! What if I key in 25.132004? If I plan to use it as a date representation, it is already wrong in any date mode (no such 13th. month), but if I key it in, the calculator cannot complain untill I tell it what to do with the number.

I know we are talking about resulting values, and this is different of keying in values. But if we see somethnig that seems to be wrong as a resulting value, let's see if the calculator sees it as a wrong input data. Try this in any HP calculator:

12.65 ->HR (in some models, it is HMS->

Well, what is wrong? I'm telling the calculator to return the decimal equivalent of 12º65' !!!! And it does not complain, you see? 12.65 is a valid number, and it promptly gives you a correct answer - 13.08333 - because sixty five minutes is something that actually exists. Now try to bring back the original value:

->HMS

Yeap! There it is! 12º65' atually is 13º05'. I am completely aware and conscious about internal rounding and precision, but when dealing with HMS and decimal representation, I have my own additional concerns.

Any comments?

My 1¢.

Luiz (Brazil)

Edited: 15 Aug 2004, 2:48 p.m.

      
Re: HP33s another bug?
Message #18 Posted by Ben Salinas on 14 Aug 2004, 1:42 p.m.,
in response to message #1 by JuanMi

Andres Rodriguez seems to be completely correct.

I tried it out on my 33s. I got the same answer as you did, but if you press show it displays: 315999999999. In other words, it is a display issue, not so much as a math issue.

I tried it out on the 32sii. The exact same result yielded, with the same show value.

I was curious, so I tried it out on a 15c. The 15c read: 3.159999 -01 (it is running in sci 9). So, the difference between the 15c and the 32sii/33s is that the 15c did not round for the display (perhaps it has something to do with the precision)

On the 33s, I took the answer, pressed ->HMS, ->HR, ->HR, ->HMS and it yielded .32

I guess the problem is that the 33s is too acurate for its display (if that can even be considered a problem)

-Ben Salinas

12345

            
Re: HP33s another bug?
Message #19 Posted by Andrés C. Rodríguez (Argentina) on 14 Aug 2004, 3:56 p.m.,
in response to message #18 by Ben Salinas

Ben: Thank you very much for your comments and comparisons.

      
Re: HP33s another bug?
Message #20 Posted by Mark A. Ordal on 14 Aug 2004, 3:12 p.m.,
in response to message #1 by JuanMi

It works properly on my HP33S---that is, I get 32 seconds if I take 3 minutes 30 seconds and subtract from it 2 minutes and 58 seconds.

I think the main issue here is that for HMS format, the HP expects hours to come BEFORE the radix point! The two digits immediately following the radix point are minutes, and the next two are seconds.

When you use HMS format and interpret it as angles, the interpretation is similar to what I just mentioned for time---that is, degrees come before the radix, and after the radix, you have 2 digits for minutes of arc, followed by 2 digits for seconds of arc.

I hope this helps.

--Mark

      
Re: HP33s another bug? - THANK YOU
Message #21 Posted by JuanMi on 14 Aug 2004, 9:31 p.m.,
in response to message #1 by JuanMi

Yeah!

Thank you to all people who commented my post.

I still *love* HP's but I hope HP will take note of such problems and correct them.

Many, many thanks again,

Juan Miguel

      
please see this thread
Message #22 Posted by bill platt on 15 Aug 2004, 10:53 p.m.,
in response to message #1 by JuanMi

Hi JuanMi,

The bug reported at the top of the linked thread below is much more important to be aware of!

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/forum.cgi?read=61505

regards,

Bill

      
Re: HP33s another bug?
Message #23 Posted by Eddie Shore on 17 Aug 2004, 8:56 a.m.,
in response to message #1 by JuanMi

Interesting. I repeated your operation on the HP48G and 49G+ and ended up with .315999999998 on both cases. Might be the internal rounding procedures. On my 33S, I get the same result you got.

            
Re: HP33s another bug?
Message #24 Posted by JuanMi on 20 Aug 2004, 2:47 a.m.,
in response to message #23 by Eddie Shore

Hello Eddi,

I don't think this is an internal rounding problem, but maybe just the subroutine which convert and shows the data in a sexagesimal format...

Above you have many "gurus" valid opinions...

But in my HP49G+ the result was Ok!.

Best regards,

JuanMi


[ Return to Index | Top of Index ]

Go back to the main exhibit hall