HP Forums

Full Version: Are US units correct?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
According to the HP 50g's unit conversion utility, these are true:

1 chain = 4 rods = 66 ftUS
1 fath (fathom) = 6 ftUS

But Prime gives these conversions:

1 chain = 4 rods = 65.9999999982 ftUS
1 fath = 5.99999999984 ftUS

Perhaps it's all based on this difference:
1 meter = 3.28083333333 ftUS (HP 50g)
1 meter = 3.28083333324 ftUS (HP Prime)

Which is correct?

EDIT: Something is clearly amiss in the Prime. It says:
1 miUS = 5279.99999983 ftUS
But in actuality 1 miUS = exactly 5280 ftUS. It looks like Prime's definition of ftUS is screwed up.
and this doesn't fix it.
Oh well.
Nothing converts to "in" on my calc.
Feels like the entire Units part has to be checked and debugged.

[attachment=2087]
(05-20-2015 06:39 AM)petaks01 Wrote: [ -> ]Nothing converts to "in" on my calc.
Feels like the entire Units part has to be checked and debugged.

Confirmed, A 7820.
(05-20-2015 06:39 AM)petaks01 Wrote: [ -> ]Nothing converts to "in" on my calc.
Feels like the entire Units part has to be checked and debugged.
It's because you're in CAS mode, see this thread for more details about this issue.
Using "inch" in place of the available "in" just gives me another error...

[attachment=2088]
Before pressing enter

[attachment=2089]
Result
When I saw the title "Are US units correct?", first reaction was "of course not!" before I understood it was related to a possible issue on the Prime. I noticed that in Star Trek TNG they are all metric, seems like the future is already known ;-)
(05-20-2015 09:01 AM)Didier Lachieze Wrote: [ -> ]
(05-20-2015 06:39 AM)petaks01 Wrote: [ -> ]Nothing converts to "in" on my calc.
Feels like the entire Units part has to be checked and debugged.
It's because you're in CAS mode, see this thread for more details about this issue.

Quite right, I'm an idiot - Why on Earth would I want to convert to in in CAS mode?
This idiot expected the basic prefix and unitconversions to be available in all three modes (CAS/RPN/textbook) as the menus are accessible.
Yep UNITS still needs some work.

It would be nice if you could use units with variables.

abc_cm for example. Seems to throw errors.
(05-20-2015 11:37 AM)CR Haeger Wrote: [ -> ]It would be nice if you could use units with variables.

abc_cm for example. Seems to throw errors.

Since variables are used to store objects, you can store objects (with units) in variables:

abc:=1.00_cm;
abc --> 1.00_cm
abc*2.00 --> 2.00_cm
(05-20-2015 12:11 PM)DrD Wrote: [ -> ]Since variables are used to store objects, you can store objects (with units) in variables:

abc:=1.00_cm;
abc --> 1.00_cm
abc*2.00 --> 2.00_cm

Thank you for that reminder which is useful if you know in advance that you want the variable to be stored as a _unit object.

What I was referring to was taking a variable with say a real value (2.0) then converting it into a _unit object. In this case, it seems you need to do the following:

Vars (enable Value soft-key) User abc --> 2.0
Units Length cm --> 2.0_cm

I forgot about the Value soft-key...

EVAL(abc) Units Length cm also works...
Inside the CAS, all derived units are stored using the MKSA system. This of course can lead to some small rounding errors in conversions from US units to US units, it's unavoidable (and in is a reserved word inside the CAS, so that you can loop in a list, you must use inch for the unit. Since inch is not a metric unit, it has no real reason to have a reserved word).
The list of derived units follows, if you find something wrong, please correct
First number is a numeric factor, remainding numbers are powers of meter, kilogram, second, Ampere, Kelvin, mol, candela, last column is reserved for currency conversions.
Code:

  const mksa_unit __Angstrom_unit={1e-10,1,0,0,0,0,0,0,0};
  const mksa_unit __Btu_unit={1055.05585262,2,1,-2,0,0,0,0,0};
  const mksa_unit __Curie_unit={3.7e10,0,0,-1,0,0,0,0,0};
  const mksa_unit __FF_unit={.152449017237,0,0,0,0,0,0,0,1};
  const mksa_unit __Fdy_unit={96485.3365,0,0,1,1,0,0,0,0};
  const mksa_unit __Gal={0.01,1,0,-2,0,0,0,0,0};
  const mksa_unit __HFCC_unit={1400,1,0,0,0,0,0,0,0};
  const mksa_unit __L_unit={0.001,3,0,0,0,0,0,0,0};
  const mksa_unit __P_unit={.1,-1,1,-1,0,0,0,0,0};
  const mksa_unit __R_unit={0.000258,0,-1,1,1,0,0,0,0};
  const mksa_unit __Rankine_unit={5./9,0,0,0,0,1,0,0,0};
  const mksa_unit __St_unit={0.0001,2,0,-1,0,0,0,0,0};
  const mksa_unit __Wh_unit={3600,2,1,-2,0,0,0,0,0};
  const mksa_unit __a_unit={100,2,0,0,0,0,0,0,0};
  const mksa_unit __acre_unit={4046.87260987,2,0,0,0,0,0,0,0};
  const mksa_unit __arcmin_unit={2.90888208666e-4,0,0,0,0,0,0,0,0};
  const mksa_unit __arcs_unit={4.8481368111e-6,0,0,0,0,0,0,0,0};
  const mksa_unit __atm_unit={101325.0,-1,1,-2,0,0,0,0,0};
  const mksa_unit __au_unit={1.495979e11,1,0,0,0,0,0,0,0};
  const mksa_unit __b_unit={1e-28,2,0,0,0,0,0,0,0};
  const mksa_unit __bar_unit={1e5,-1,1,-2,0,0,0,0,0};
  const mksa_unit __bbl_unit={.158987294928,3,0,0,0,0,0,0,0};
  const mksa_unit __bblep_unit={.158987294928*0.857*41.76e9,2,1,-2,0,0,0,0,0};
  const mksa_unit __boe_unit={.158987294928*0.857*41.76e9,2,1,-2,0,0,0,0,0};
  const mksa_unit __bu={0.036368736,3,0,0,0,0,0,0,0};
  const mksa_unit __buUS={0.03523907,3,0,0,0,0,0,0,0};
  const mksa_unit __cal_unit={4.1868,2,1,-2,0,0,0,0,0};
  const mksa_unit __cf_unit={1.08e6,2,1,-2,0,0,0,0,0};
  const mksa_unit __chain_unit={20.1168402337,1,0,0,0,0,0,0,0};
  const mksa_unit __ct_unit={0.0002,0,1,0,0,0,0,0,0};
  const mksa_unit __dB_unit={1,0,0,0,0,0,0,0,0};
  const mksa_unit __d_unit={86400,0,0,1,0,0,0,0,0};
  const mksa_unit __deg_unit={1.74532925199e-2,0,0,0,0,0,0,0,0};
  // const mksa_unit __degreeF_unit={5./9,0,0,0,0,1,0,0,0};
  const mksa_unit __dyn_unit={1e-5,1,1,-2,0,0,0,0,0};
  const mksa_unit __eV_unit={1.60217733e-19,2,1,-2,0,0,0,0,0};
  const mksa_unit __erg_unit={1e-7,2,1,-2,0,0,0,0,0};
  const mksa_unit __fath_unit={1.82880365761,1,0,0,0,0,0,0,0};
  const mksa_unit __fbm_unit={0.002359737216,3,0,0,0,0,0,0,0};
  const mksa_unit __fc_unit={10.7639104167,1,0,0,0,0,0,0,0};
  const mksa_unit __fermi_unit={1e-15,1,0,0,0,0,0,0,0};
  const mksa_unit __flam_unit={3.42625909964,-2,0,0,0,0,0,1,0};
  const mksa_unit __fm_unit={1.82880365761,1,0,0,0,0,0,0,0};
  const mksa_unit __ft_unit={0.3048,1,0,0,0,0,0,0,0};
  const mksa_unit __ftUS_unit={0.304800609601,1,0,0,0,0,0,0,0};
  const mksa_unit __g_unit={1e-3,0,1,0,0,0,0,0,0};
  const mksa_unit __galC_unit={0.00454609,3,0,0,0,0,0,0,0};
  const mksa_unit __galUK_unit={0.004546092,3,0,0,0,0,0,0,0};
  const mksa_unit __galUS_unit={0.003785411784,3,0,0,0,0,0,0,0};
  const mksa_unit __cu_unit={0.000236588236373,3,0,0,0,0,0,0,0};
  const mksa_unit __gf_unit={0.00980665,1,1,-2,0,0,0,0,0};
  const mksa_unit __gmol_unit={1,0,0,0,0,0,1,0,0};
  const mksa_unit __gon_unit={1.57079632679e-2,0,0,0,0,0,0,0};
  const mksa_unit __grad_unit={1.57079632679e-2,0,0,0,0,0,0,0,0};
  const mksa_unit __grain_unit={0.00006479891,0,1,0,0,0,0,0,0};
  const mksa_unit __h_unit={3600,0,0,1,0,0,0,0,0};
  const mksa_unit __ha_unit={10000,2,0,0,0,0,0,0,0};
  const mksa_unit __hp_unit={745.699871582,2,1,-3,0,0,0,0,0};
  const mksa_unit __in_unit={0.0254,1,0,0,0,0,0,0,0};
  const mksa_unit __inH2O_unit={248.84,-1,1,-2,0,0,0,0,0};
  const mksa_unit __inHg_unit={3386.38815789,-1,1,-2,0,0,0,0,0};
  const mksa_unit __j_unit={86400,0,0,1,0,0,0,0,0};
  const mksa_unit __kip_unit={4448.22161526,1,1,-2,0,0,0,0,0};
  const mksa_unit __knot_unit={0.51444444444,1,0,-1,0,0,0,0,0};
  const mksa_unit __kph_unit={0.2777777777777,1,0,-1,0,0,0,0,0};
  const mksa_unit __l_unit={0.001,3,0,0,0,0,0,0,0};
  const mksa_unit __lam_unit={3183.09886184,-2,0,0,0,0,0,1,0};
  const mksa_unit __lb_unit={0.45359237,0,1,0,0,0,0,0,0};
  const mksa_unit __lbf_unit={4.44922161526,1,1,-2,0,0,0,0,0};
  const mksa_unit __lbmol_unit={453.59237,0,0,0,0,0,1,0,0};
  const mksa_unit __lbt_unit={0.3732417216,0,1,0,0,0,0,0,0};
  const mksa_unit __lep_unit={0.857*41.76e6,2,1,-2,0,0,0,0,0};
  const mksa_unit __liqpt_unit={0.000473176473,3,0,0,0,0,0,0,0};
  const mksa_unit __lyr_unit={9.46052840488e15,1,0,0,0,0,0,0,0};
  const mksa_unit __mi_unit={1609.344,1,0,0,0,0,0,0,0};
  const mksa_unit __miUS_unit={1609.34721869,1,0,0,0,0,0,0,0};
  const mksa_unit __mil_unit={0.0000254,1,0,0,0,0,0,0,0};
  const mksa_unit __mile_unit={1609.344,1,0,0,0,0,0,0,0};
  const mksa_unit __mille_unit={1852,1,0,0,0,0,0,0,0};
  const mksa_unit __mn_unit={60,0,0,1,0,0,0,0,0};
  const mksa_unit __mmHg_unit={133.322368421,-1,1,-2,0,0,0,0,0};
  const mksa_unit __molK_unit={1,0,0,0,0,1,1,0,0};
  const mksa_unit __mph_unit={0.44704,1,0,-1,0,0,0,0,0};
  const mksa_unit __nmi_unit={1852,1,0,0,0,0,0,0,0};
  const mksa_unit __oz_unit={0.028349523125,0,1,0,0,0,0,0,0};
  const mksa_unit __ozUK_unit={2.8413075e-5,3,0,0,0,0,0,0,0};
  const mksa_unit __ozfl_unit={2.95735295625e-5,3,0,0,0,0,0,0,0};
  const mksa_unit __ozt_unit={0.0311034768,0,1,0,0,0,0,0,0};
  const mksa_unit __pc_unit={3.08567818585e16,1,0,0,0,0,0,0,0};
  const mksa_unit __pdl_unit={0.138254954376,1,1,-2,0,0,0,0,0};
  const mksa_unit __pk_unit={0.0088097675,3,0,0,0,0,0,0,0};
  const mksa_unit __psi_unit={6894.75729317,-1,1,-2,0,0,0,0,0};
  const mksa_unit __pt_unit={0.000473176473,3,0,0,0,0,0,0,0};
  const mksa_unit __ptUK_unit={0.0005682615,3,0,0,0,0,0,0,0};
  const mksa_unit __qt_unit={0.000946359246,3,0,0,0,0,0,0,0};
  const mksa_unit __rd_unit={0.01,2,0,-2,0,0,0,0,0};
  const mksa_unit __rem_unit={0.01,2,0,-2,0,0,0,0,0};
  const mksa_unit __rod_unit={5.02921005842,1,0,0,0,0,0,0,0};
  const mksa_unit __rpm_unit={0.0166666666667,0,0,-1,0,0,0,0,0};
  const mksa_unit __sb_unit={10000,-2,0,0,0,0,0,1,0};
  const mksa_unit __slug_unit={14.5939029372,0,1,0,0,0,0,0,0};
  const mksa_unit __st_unit={1,3,0,0,0,0,0,0,0};
  const mksa_unit __t_unit={1000,0,1,0,0,0,0,0,0};
  const mksa_unit __tbsp_unit={1.47867647813e-5,3,0,0,0,0,0,0,0};
  const mksa_unit __tec_unit={41.76e9/1.5,2,1,-2,0,0,0,0,0};
  const mksa_unit __tep_unit={41.76e9,2,1,-2,0,0,0,0,0};
  const mksa_unit __tepC_unit={830,1,0,0,0,0,0,0,0};
  const mksa_unit __tepcC_unit={1000,1,0,0,0,0,0,0,0};
  const mksa_unit __tepgC_unit={650,1,0,0,0,0,0,0,0};
  const mksa_unit __tex={1e-6,-1,1,0,0,0,0,0,0};
  const mksa_unit __therm_unit={105506000,2,1,-2,0,0,0,0,0};
  const mksa_unit __toe_unit={41.76e9,2,1,-2,0,0,0,0,0};
  const mksa_unit __ton_unit={907.18474,0,1,0,0,0,0,0,0};
  const mksa_unit __tonUK_unit={1016.0469088,0,1,0,0,0,0,0,0};
  const mksa_unit __torr_unit={133.322368421,-1,1,-2,0,0,0,0,0};
  const mksa_unit __tr_unit={2*M_PI,0,0,0,0,0,0,0,0};
  const mksa_unit __tsp_unit={4.928921614571597e-6,3,0,0,0,0,0,0,0};
  const mksa_unit __u_unit={1.6605402e-27,0,1,0,0,0,0,0,0};
  const mksa_unit __yd_unit={0.9144,1,0,0,0,0,0,0,0};
  const mksa_unit __yr_unit={31556925.9747,0,0,1,0,0,0,0,0};
  const mksa_unit __micron_unit={1e-6,1,0,0,0,0,0,0,0};

  const mksa_unit __hbar_unit={1.05457266e-34,2,1,-1,0,0,0,0};        
  const mksa_unit __c_unit={299792458,1,0,-1,0,0,0,0};        
  const mksa_unit __g__unit={9.80665,1,0,-2,0,0,0,0};       
  const mksa_unit __IO_unit={1e-12,0,1,-3,0,0,0,0}; 
  const mksa_unit __epsilonox_unit={3.9,0,0,0,0,0,0,0}; 
  const mksa_unit __epsilonsi_unit={11.9,0,0,0,0,0,0,0,0}; 
  const mksa_unit __qepsilon0_unit={1.4185979e-30,-3,-1,5,3,0,0,0}; 
  const mksa_unit __epsilon0q_unit={55263469.6,-3,-1,3,1,0,0,0}; 
  const mksa_unit __kq_unit={8.617386e-5,2,1,-3,-1,-1,0,0}; 
  const mksa_unit __c3_unit={.002897756,1,0,0,0,1,0,0}; 
  const mksa_unit __lambdac_unit={ 0.00242631058e-9,1,0,0,0,0,0,0,0}; 
  const mksa_unit __f0_unit={2.4179883e14,0,0,-1,0,0,0,0}; 
  const mksa_unit __lambda0_unit={1239.8425e-9,1,0,0,0,0,0,0}; 
  const mksa_unit __muN_unit={5.0507866e-27,2,0,0,1,0,0,0}; 
  const mksa_unit __muB_unit={ 9.2740154e-24,2,0,0,1,0,0,0}; 
  const mksa_unit __a0_unit={.0529177249e-9,1,0,0,0,0,0,0}; 
  const mksa_unit __Rinfinity_unit={10973731.534,-1,0,0,0,0,0,0}; 
  const mksa_unit __Faraday_unit={96485.309,0,0,1,1,0,-1,0}; 
  const mksa_unit __phi_unit={2.06783461e-15,2,1,-2,-1,0,0,0};
  const mksa_unit __alpha_unit={7.29735308e-3,0,0,0,0,0,0,0}; 
  const mksa_unit __mpme_unit={1836.152701,0,0,0,0,0,0,0}; 
  const mksa_unit __mp_unit={1.6726231e-27,0,1,0,0,0,0,0}; 
  const mksa_unit __qme_unit={1.75881962e11,0,-1,1,1,0,0,0};
  const mksa_unit __me_unit={9.1093897e-31,0,1,0,0,0,0,0}; 
  const mksa_unit __qe_unit={1.60217733e-19,0,0,1,1,0,0,0};
  const mksa_unit __h__unit={6.6260755e-34,2,1,-1,0,0,0,0}; 
  const mksa_unit __G_unit={6.67259e-11,3,-1,-2,0,0,0,0}; 
  const mksa_unit __mu0_unit={1.25663706144e-6,1,1,-2,-2,0,0,0}; 
  const mksa_unit __epsilon0_unit={8.85418781761e-12,-3,-1,4,2,0,0,0}; 
  const mksa_unit __sigma_unit={ 5.67051e-8,0,1,-3,0,-4,0,0}; 
  const mksa_unit __StdP_unit={101325.0,-1,1,-2,0,0,0,0}; 
  const mksa_unit __StdT_unit={273.15,0,0,0,0,1,0,0}; 
  const mksa_unit __R__unit={8.31451,2,1,-2,0,-1,-1,0}; 
  const mksa_unit __Vm_unit={22.4141e-3,3,0,0,0,0,-1,0}; 
  const mksa_unit __k_unit={1.380658e-23,2,1,-2,0,-1,0,0}; 
  const mksa_unit __NA_unit={6.0221367e23,0,0,0,0,0,-1,0}; 
  const mksa_unit __mSun_unit={1.989e30,0,1,0,0,0,0,0}; 
  const mksa_unit __RSun_unit={6.955e8,1,0,0,0,0,0,0}; 
  const mksa_unit __PSun_unit={3.846e26,2,1,-3,0,0,0,0}; 
  const mksa_unit __mEarth_unit={5.9736e24,0,1,0,0,0,0,0}; 
  const mksa_unit __REarth_unit={6.371e6,1,0,0,0,0,0,0}; 
  const mksa_unit __sd_unit={8.61640905e4,0,0,1,0,0,0,0}; 
  const mksa_unit __syr_unit={3.15581498e7,0,0,1,0,0,0,0};
(05-20-2015 02:16 PM)parisse Wrote: [ -> ]const mksa_unit __ftUS_unit={0.304800609601,1,0,0,0,0,0,0,0};
This looks wrong to me. An inch is now defined as exactly 25.4mm which means one foot is exactly 0.3048m
(05-20-2015 04:58 PM)David Hayden Wrote: [ -> ]
(05-20-2015 02:16 PM)parisse Wrote: [ -> ]const mksa_unit __ftUS_unit={0.304800609601,1,0,0,0,0,0,0,0};
This looks wrong to me. An inch is now defined as exactly 25.4mm which means one foot is exactly 0.3048m

That is the us survey foot which is 1200⁄3937m

There was a missing 0 in the definition so it read ..61 instead of ..601 at the end.
nice finding:
CAS, "usual" settings, trying
Code:
CONVERT(1_(km),1_(inch))
see yourself:
[attachment=2090]
Does it mean that _ft and _ftUS should be the same (then why not remove _ftUS)? It would make more sense to keep _ftUS!=_ft, but I don't really care... I just don't want to loose too much time on this!
(05-20-2015 06:44 PM)Thomas_Sch Wrote: [ -> ]nice finding:
CAS, "usual" settings, trying
Code:
CONVERT(1_(km),1_(inch))
see yourself:
[attachment=2091]

Any comments to the strong output?

My fault,
or a new error in the Prime?

Thanks.

Edit: the last line in the screenshot hat been my original input,
I get this, if I select the crazy line above and press the soft key COPY .

- Why the Prime converts "inch" to these chinese characters?
- How should the input to obtain a correct conversion to inch within CAS mode?

The Prime does habe the last firmware, language is set to english.
The physical calc doesn't show the "chinese" tail.

Only this:

CONVERT(1_km,1_)
"Error: Inconsistent units"

My guess is that it strips the inch part from the input before trying to convert and gets really confused as the "in" is a reserved word in CAS based on a previous post here.

I sure would like a working conversion/units/prefix part and if we have to skip the "in" and use "inch" everywhere thats fine with me.
(05-21-2015 07:59 AM)petaks01 Wrote: [ -> ]The physical calc doesn't show the "chinese" tail.

Only this:

CONVERT(1_km,1_)
"Error: Inconsistent units"

My guess is that it strips the inch part from the input before trying to convert and gets really confused as the "in" is a reserved word in CAS based on a previous post here.

I sure would like a working conversion/units/prefix part and if we have to skip the "in" and use "inch" everywhere thats fine with me.

On the physical calculator, in CAS mode, typing
Code:
CONVERT(1_(km),1_(inch))
gives "Error: Inconsistent units".

But typing
Code:
convert(1_(km),1_(inch))
works, except that "_inch" is displayed as "_" at the end of the numerical answer. Also, lowercase "convert" is displayed as uppercase CONVERT.

However, copying this command back into the entry line gives
Code:
convert(1_(km),1_(inch))
which is correct.

Using the "Sto->" key like this:
Code:
1_(m)->_inch
also works, although once again "_inch" is displayed as "_" in the result.

However,
Code:
1_(m)->1_(inch)
gives an error, which seems inconsistent with the behaviour of "convert".

The only definite bug that I have found is the non-display of "inch". However, I feel that the system could be more forgiving of variant input than in fact it is.

Nigel (UK)[/code]
Pages: 1 2
Reference URL's