HMS Calculations 28S vs 42S


I have been comparing my newly acquired 28S with my 42S. The 28S has special functions for adding numbers in HMS (hours/degrees minutes seconds) format whereas the 42S requires that you convert to degrees, add and convert back.

On the 28S, I did

0.3 [ENTER] 0.2 [HMS+] -> 0.5 (as expected)

On the 42S, I did

0.3 [->HR] 0.2 [->HR] [+] [->HMS] -> 0.5 (as expected)

BUT if I mimic the 42 on the 28 and repeat the above calculation, I get 0.496. At first I was surprised at the apparent discrepancy. 0.496 is a long way short of 0.5. Then I realised that in HMS it's not.

I presume that the "problem" was caused by the 0.2 (20 minutes) converting to 0.3333... However, I would have expected the 28 either to return 0.4959999... or else 0.5. 0.496 in HMS is 49 minutes and 60 seconds, i.e. 50 minutes, so why does the 28 not "realise" that.

Any explanation would be much appreciated.


You're right.

Now there are two wondering for an answer.


OK. I've come to the conclusion that it's not a bug. In fact, I think it's a particularly elegant feature(!) although I can't find any reference to it in the manuals.

Obviously, adding HMS numbers without using the HMS+ function is a bit daft, but the problem will also surface if you do: 0.2 [HMS->] [->HMS] which yields 0.196. Again, the 42S has no "problem" with this. Here's my take on it:

You know how SIN(pi), when pi is expressed as a number, isn't zero? That's because the numeric pi isn't (and never can be) exactly pi. I think HP went looking for more places to be pedantic. 20 minutes expressed as degrees is 0.333... recurring. So when you convert 0.333... (to the limit of the calculator's accuracy) back to minutes, it says "well, it's not exactly 20 minutes, more like 19 minutes 60 seconds". It's quite clever really. It's the same thing, but it warns you that it's not necessarily quite right.

I was thinking this could be extended to 1 [ENTER] 3 / 3 * resulting in 0.X where X would be a new symbol for ten as in the Roman X. "Nought point ten" is 1, but not quite!


Sorry, but... I still cannot look at a 0.60 degrees as equals to 1.0. I accept a 60 minutes equals to 1 degree, but a 0.60 ... I have never seen a 1 degree expressed this way, I don't know. I understand your concerns cause they are mine, too: is it O.K.?

I would accept (as it seems to happen in the 42S) that an angle expressed as 1.59599999, or 1°59'59"999999 is rounded to 2°00'00"000 so the equipment does not have more digits to express the meaningful last ones. Otherwise, there is no rounding function for a HHH.MMSSss representation, cause if you try to round 1.59599999 to three decimal places, you have 1.596. The calculator does not know if this is a representation of an angle (or time measurement) or a decimal number itself. I believe the rounding occurs in the 28S after conversion, and this was corrected in the newer systems (42S, 48/49), so the rounding procedure occurs in the decimal internal number, before calculating its HHH.MMSSss representation.

Just try this in the 42S:
enter 5.95999999999 E-1; (as many 9´s)
add 1;
show the mantissa:


Any ideas?



I'm not sure whether I would weigh in on the side of a bug or not, but I think your explanation is quite clever!

The HP engineers (probably exiled in favor of art designers whose value-add is ice-blue cases!) might say,
"Uh...yeah...that's it...that's exactly what we were thinking..."



Chris Randle wrote:

> I have been comparing my newly acquired 28S with my 42S.

> The 28S has special functions for adding numbers in HMS

> (hours/degrees minutes seconds) format whereas the 42S

> requires that you convert to degrees, add and convert back.

What? since the 42S is compatible with the HP-41 it must have the HMS+ function. Am I missing something?



You're quite right. The 42S does have HMS+ and HMS-. I didn't spot them because they're in the catalog, but not assigned to any menu (that I could find).

However, my beef isn't with the 42, it doesn't get flustered whichever way you do the calculation.

I can't even say that the 28's problem is a rounding error (although I suspect that ultimately it must be) because if you subtract 0.496 from the result on the stack, you get a resounding zero.


What happens if you play with the 0.496 answer?

Like add 1 second, then subtract 1 second?


If I use 0.0001 [HMS+] 0.0001 [HMS-], I end up with 0.5.

If I avoid the HMS+/- functions and convert everything to degrees, add, subtract, then convert back, I'm left with 0.496 again.

I've convinced myself that it's actually a very clever feature and I've posted a possible explanation elsewhere in this thread.

Possibly Related Threads...
Thread Author Replies Views Last Post
  HMS commands Geoff Quickfall 6 1,123 10-14-2013, 06:27 PM
Last Post: Tim Wessman
  8/60 -> HMS PGILLET 47 4,988 05-04-2013, 11:38 AM
Last Post: Thomas Klemm
  Riemann's Zeta Function (HP-28S) Gerson W. Barbosa 8 1,238 02-03-2013, 03:23 PM
Last Post: Gerson W. Barbosa
  [wp34s] Alternative MIO (allows calculations when entering element values) David Maier 1 548 02-03-2013, 02:51 PM
Last Post: Marcus von Cube, Germany
  28S Pi Functionality Matt Fegenbush 3 784 10-17-2012, 02:15 AM
Last Post: Nick_S
  HP-28S plays "Happy Birthday" Kevin F 0 497 08-06-2012, 04:53 PM
Last Post: Kevin F
  HP-28S Mathematical Applications manual errata Tom Sauntry 2 676 07-25-2012, 09:54 AM
Last Post: Tom Sauntry
  HP-28S Syntax Errors William N Strew 7 1,230 07-15-2012, 05:09 PM
Last Post: Luiz C. Vieira (Brazil)
  50G<-->28S SYSEVAL map Matt Agajanian 3 805 05-29-2012, 03:28 PM
Last Post: Christoph Giesselink
  Financial Calculations for the HP41: another enhanced version Luiz C. Vieira (Brazil) 0 404 04-16-2012, 09:16 AM
Last Post: Luiz C. Vieira (Brazil)

Forum Jump: