Post Reply 
HP 12C (Metric to Standard Conversion)
08-15-2017, 05:57 AM (This post was last modified: 08-15-2017 09:19 AM by Gamo.)
Post: #1
HP 12C (Metric to Standard Conversion)
Here is a simple program to convert metric to standard in several form here.
Centimeter > Inch
Kilometer > Pound
Liter > Gallon
C > F

just start GTO to the one you looking for....


Attached File(s)
.pdf  MetricToStandard.pdf (Size: 95.57 KB / Downloads: 35)
Find all posts by this user
Quote this message in a reply
08-15-2017, 10:13 AM (This post was last modified: 08-15-2017 10:26 AM by Dieter.)
Post: #2
RE: HP 12C (Metric to Standard Conversion)
(08-15-2017 05:57 AM)Gamo Wrote:  Here is a simple program to convert metric to standard

If your standard has imperial units. ;-)

(08-15-2017 05:57 AM)Gamo Wrote:  Kilometer > Pound
...
F > C

Of course it's kg to lb. And °C to °F.
But in both cases the PDF is correct.

(08-15-2017 05:57 AM)Gamo Wrote:  just start GTO to the one you looking for....

Thank you for your program. I hope you do not mind a few suggestions that may help making it even better.

The kg-lb and l-gal conversions use good approximations with 1 kg ~ 4579/2077 lb resp. 1 l ~ 1179/4463 gal. But then... instead of eight digits and two operations you may just as well take the exact values and divide by 0,45359237 resp. multiply by 3,785411784.

BTW – the WP34s and 31s assume 1 lb = 0,4535924 kg. My 34s manual states even one digit less, i.e. 0,453592. What is the official value? Pauli?

Then, you could start the program with four GTOs to the respective routines. This way the user does not have to memorize the numbers 00, 08, 22 and 36 but simply 01, 02, 03 and 04. Also the initial ENTERs in the four routines may be removed then.

One could even code a deluxe version that takes a code 1, 2, 3 or 4 from x and jumps to the respective routine from there:
28 ENTER 1 R/S => 11,02 in
15 ENTER 2 R/S => 33,07 lb
etc.

And a final hint: in any case, i.e. also with your original program, the inverse conversion can be done by pressing 1/x before and after the R/S:

Example: 15 inches to centimeters
[GTO] 00   15 [1/x] [R/S] [1/x] => 38,1 cm

Dieter
Find all posts by this user
Quote this message in a reply
08-15-2017, 10:39 AM (This post was last modified: 08-15-2017 10:40 AM by matthiaspaul.)
Post: #3
RE: HP 12C (Metric to Standard Conversion)
More than 220 years after its introduction it is, perhaps, time to accept that the world-wide standard is the metric system (in the form of the International System of Units (aka SI), which was published almost sixty years ago as well)...

Greetings,

Matthias

[EDIT: Dieter was faster... ;-)]


--
"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
08-15-2017, 11:17 AM (This post was last modified: 08-15-2017 11:33 AM by pier4r.)
Post: #4
RE: HP 12C (Metric to Standard Conversion)
OT:

what irks me about the freedom units (how they are called on reddit) is not that there is the pound instead of the kg, or the gallon instead of the liter. It is the scale that does not use a fixed multiplier, like 10, or 12.

would be nice if I have 10 inches and I get a foot, 10 feet and I get a yard and so on. Instead it is not so. Surely if one uses it often one will remember all the different multipliers, but otherwise it is clumsy for procedures.

So, I personally reject the idea that freedom units are standard units. Go find some fixed multipliers and then we can talk about it.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
08-15-2017, 11:32 AM
Post: #5
RE: HP 12C (Metric to Standard Conversion)
Thanks Dieter
I'm only amateur and start to play around with this HP 12C program and your advice is very welcome.
I though that the four digits fraction will get 9 decimal accuracy internally so I used fraction (make division) instead of using specific fix number. I try to check all the units and it give accuracy above 6 decimal place.

Gamo
Find all posts by this user
Quote this message in a reply
08-15-2017, 11:37 AM
Post: #6
RE: HP 12C (Metric to Standard Conversion)
Quote:More than 220 years after its introduction it is, perhaps, time to accept that the world-wide standard is the metric system (in the form of the International System of Units (aka SI), which was published almost sixty years ago as well)...

We accepted and use SI. We're just taking our time finishing the conversion. While we're waiting we enjoy the lectures and scorn from our peers. ;-)


Cheers,

John
Find all posts by this user
Quote this message in a reply
08-15-2017, 12:03 PM (This post was last modified: 08-15-2017 12:19 PM by Dieter.)
Post: #7
RE: HP 12C (Metric to Standard Conversion)
(08-15-2017 11:32 AM)Gamo Wrote:  I'm only amateur and start to play around with this HP 12C program and your advice is very welcome.

Great.

(08-15-2017 11:32 AM)Gamo Wrote:  I though that the four digits fraction will get 9 decimal accuracy internally so I used fraction (make division) instead of using specific fix number. I try to check all the units and it give accuracy above 6 decimal place.

That's six digit accuracy from eight digits. ;-)
I'd say the best you can get is 1471/3243 resp. 8044/2125 (error in both cases < 2 E–8).
With one more digit there is 7658/16883 which is off by ~1 E–9.

In any case it takes 2x 10 steps to obtain the conversion factors. Simply using the exact values does not require more (9+11) and returns an exact result. So for sure this is the preferred method.

Dieter
Find all posts by this user
Quote this message in a reply
08-15-2017, 03:02 PM
Post: #8
RE: HP 12C (Metric to Standard Conversion)
(08-15-2017 05:57 AM)Gamo Wrote:  Liter > Gallon

just start GTO to the one you looking for....

You haven't specified if this is UK Gallon, US Gallon or Canadian Gallon. (From your example in the PDF I assume it's US Gallon).

I would encourage you to post your programs in the Software Library:
http://www.hpmuseum.org/forum/forum-13.html

Best regards,
Bart


Visit this user's website Find all posts by this user
Quote this message in a reply
08-15-2017, 04:26 PM
Post: #9
RE: HP 12C (Metric to Standard Conversion)
It depends who adopted the metric system.
NASA lost a $125 million Mars Orbiter because a Lockheed Martin engineering team used English units of measurement while the agency's team used the more conventional metric system for a key spacecraft operation.

Some Famous Unit Conversion Errors
https://spacemath.gsfc.nasa.gov/weekly/6Page53.pdf
Find all posts by this user
Quote this message in a reply
Post Reply 




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