You're right. I didn't take into account the fact that in the new implementation the redefinition of a parent unit cascades onto the derived units automatically... User RPL doesn't allow this!
From a user's point of view, the only thing that matters is a consistent naming of the units, so that dependencies are clearly identifiable by inspection.
(05-09-2016 05:42 PM)Claudio L. Wrote: (05-08-2016 01:30 PM)JoJo1973 Wrote:
- _galUK: Imperial gallon = exactly 4.546092_l
- _galC: New Imperial gallon used in Canada = exactly 4.54609_l (note the missing last digit!)
- _gal: Winchester gallon = exactly 231_in^3
The trick is that _galUK has been in use from 1976 to 1985, when UK switched to _galC. I think it would be more sensible to retain the difference between the two definitions as HP did, and add a new definition for the Canadian (and later UK ounce): 1_galC = 160_ozC.
The HP Prime team has also created alternative definitions for the pint and the bushel to take into account the different gallons, even if the effort has not taken to the full consequences. The HP50's _pt and _bu have been renamed to _liqpt (why?!?) and _buUS, a new _ptUK has been created and a new _bu unit has been defined using the Canadian gallon.
Very confusing, IMHO.
I'm not sure I agree, when a unit is redefined we should use the latest definition, and perhaps keep the old one with a special name. I think galUK should be the modern galUK as people doing calculations now will be expecting the "new" galUK (I'm quoting "new" since it's been in place for >30 years!).
I didn't check your dates, but if it's true the old galUK was in place for only 9 years, then how do we justify that definition taking the center stage?
I think galUK should stay with the modern definition by default. However...
Did you know that newRPL supports redefinition of system units? All you have to do is:
4.546092_l
'galUK'
UDEFINE
And your gallon UK now has the pre-1985 definition.
Now if you don't think that's cool enough, read this:
Every time galUK appears in a user or system definition, it will use the newly defined value. This means all units derived from the gallon UK will automatically use the new definition (_ptUK, _qtUK, etc, which I'll add per your post).