Post Reply 
WP-34S galUS-> l Precision
09-07-2016, 10:20 PM
Post: #1
WP-34S galUS-> l Precision
On firmware 43S 3.3[Print]3844 in the CONV menu:

1 galUS = 3.785412 l [WP-34S]

The US Gallon has an exact value of 3.785411784 per:

1 yd (36 in) = 0.9144 m [international definition]
1 gal = 231 in^3 [US definition]

If that's accurate, can the precision be increased?

Thanks,
Nick
Find all posts by this user
Quote this message in a reply
09-07-2016, 11:56 PM
Post: #2
RE: WP-34S galUS-> l Precision
We used the conversions tables by NIST for our constants. That's about as canonical as can be got.

Now if enough people feel that the error here is too large, it is easy to change but I'd rather stay with the official NIST conversions. There are other constants which are likely known more accurately than the 34S represents them, but for which we couldn't cite a reliable source.


Pauli
Find all posts by this user
Quote this message in a reply
09-08-2016, 05:02 AM
Post: #3
RE: WP-34S galUS-> l Precision
(09-07-2016 11:56 PM)Paul Dale Wrote:  We used the conversions tables by NIST for our constants. That's about as canonical as can be got.

All the conversions listed on that page are rounded to a maximum of 7 significant digits, even when exact conversion factors are well established but require more than 7 significant digits. This is even mentioned in NIST Guide to the SI, Appendix B: Conversion Factors: "The factors given in Secs. B.8 and B.9 are written as a number equal to or greater than 1 and less than 10, with 6 or fewer decimal places."

Bottom line: It might be good enough for government work, but I wouldn't consider THAT particular table to be a "canonical" list of conversion factors at all. What we need is the original table of factors which were rounded off to create this table.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
09-08-2016, 07:44 AM
Post: #4
RE: WP-34S galUS-> l Precision
(09-08-2016 05:02 AM)Joe Horn Wrote:  It might be good enough for government work, but I wouldn't consider THAT particular table to be a "canonical" list of conversion factors at all. What we need is the original table of factors which were rounded off to create this table.
Good point!

Greetings,

Matthias


--
"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
09-08-2016, 01:15 PM (This post was last modified: 09-08-2016 01:38 PM by renif.)
Post: #5
RE: WP-34S galUS-> l Precision
A friend who works as a pharmacist lent my WP 34s for some time in order to test it for its applicability. To my surprise he immediately discovered the limited precision of the conversion factors when converting from troy ounces to grams. Of course it's a minuscule difference which might not play any role in practical daily conversions, but it is of greater importance in certain fields of physics or chemistry. As a consequence, whenever I need a most precise conversion it's the HP 50g which has to answer the call of duty, although I'd prefer to use the much more compact 34s for such an easy task. Apart from that, the 34s is always the first one to be grabbed from the desk... Smile
Find all posts by this user
Quote this message in a reply
09-08-2016, 02:49 PM
Post: #6
RE: WP-34S galUS-> l Precision
Examples:

Code:
1
CONV galUS->l
E3
*
CONV ml->flozUS
128.0000054102436 [exact answer is 128 fl oz]

Code:
1
CONV galUS->l
E3
*
1
CONV inches->cm
3
y^x
/
231.0000131811287 [exact answer is 231 cu in (in^3)]

I live in the US. Though units are reported in US customary, scientific operations are performed in SI.
Find all posts by this user
Quote this message in a reply
09-09-2016, 02:33 AM
Post: #7
RE: WP-34S galUS-> l Precision
(09-08-2016 05:02 AM)Joe Horn Wrote:  What we need is the original table of factors which were rounded off to create this table.

Last year I compiled the best definitions (best = exact where possible) for all the units while working on newRPL units module. While it may sound easy, unit conversions without precision loss is no easy task, because you have to define a composite unit in terms of other units (not necessarily base units) which have exact definitions, rather than the same chosen base unit for all. Then you need to evaluate recursively at run time all the operations to determine the conversion factor at the given system precision. This takes both a lot of space and computing power.
I was able to make this work on newRPL after a lot of research to get the proper unit definitions. If anyone is interested, the source code of newRPL has a list of all units supported with their "exact" definitions shown in the comments. But implementing this will probably require more ROM space and computing power than the 34S has available, so don't keep your hopes too high.
Find all posts by this user
Quote this message in a reply
09-09-2016, 04:47 AM
Post: #8
RE: WP-34S galUS-> l Precision
(09-09-2016 02:33 AM)Claudio L. Wrote:  But implementing this will probably require more ROM space and computing power than the 34S has available, so don't keep your hopes too high.

Just a little more precision could have the US units agree with each other. Pauli would require a credible list of higher precision to make any changes verifiable and less time consuming. Do you still have your source list?

I think I've exhausted the NIST search in Google and the other US agencies seem to use less precision (I'd think we'd care more about our alcohol trade volumes than we do). Perhaps a research entity or international standards group?

Yip,
Nick
Find all posts by this user
Quote this message in a reply
09-09-2016, 08:04 AM
Post: #9
RE: WP-34S galUS-> l Precision
(09-09-2016 04:47 AM)Nick Wrote:  
(09-09-2016 02:33 AM)Claudio L. Wrote:  But implementing this will probably require more ROM space and computing power than the 34S has available, so don't keep your hopes too high.

Just a little more precision could have the US units agree with each other. Pauli would require a credible list of higher precision to make any changes verifiable and less time consuming. Do you still have your source list?

Yip,
Nick

Since there is a NIST tour planned for HHC2016 why don't you grab it while there? :

On a serious note, I would not expect a budget calc to give exact symbolic conversion like a HP48SX. It should be perfectly accurate up to the precision of the numerical display of the calculator.

Ie 7 digit precision on a 15? digit calculator is a baffling oversight. Especially since some of the conversions have EXACT definitions with a few more digits.
Find all posts by this user
Quote this message in a reply
09-09-2016, 08:05 AM
Post: #10
RE: WP-34S galUS-> l Precision
How does newRPL deal with unit conversions unrepresentable with decimal arithmetic?

Mustn't there be a precision loss involved with these using floating point arithmetic, even though they might be exact some of the time using rational arithmetic?



Pauli
Find all posts by this user
Quote this message in a reply
09-09-2016, 06:37 PM
Post: #11
RE: WP-34S galUS-> l Precision
(09-09-2016 04:47 AM)Nick Wrote:  Just a little more precision could have the US units agree with each other. Pauli would require a credible list of higher precision to make any changes verifiable and less time consuming. Do you still have your source list?

I extracted these from the comments in the source code, I hope there are no errors (if you find any, please let me know).

Code:

 'm'=1
 'kg'=1
 's'=1
 'a'=1_m^2
 'ha'=100_a
 'ca'=0.01_a
 'Å'=1e-10_m
 'A'=1
 'acre'=4840_yd
 'acreUS'=4840_ydUS
 'arcmin'=3*(180^-2)*pi_r
 'arcs'=9*(180^-3)*pi_r
 'atm'=101325_Pa
 'au'=149597870700_m
 'b'=1e-28_m
 'bar'=1e5_Pa
 'bbl'=42_gal
 'Bq'=1_1/s
 'Btu'=1055.056_J
 'BtuIT'=1055.05585262_J
 'bu'=2150.42_in^3
 'buC'=8_galC
 'buUK'=8_galUK
 '°C' IS A BASE UNIT BECAUSE IT'S INCONSISTENT UNLESS SPECIAL CASES
 'Δ°C'=1_ΔK
 'c'=299792458_m/s
 'C'=1_A*s
 'cal'=4.184_J
 'calIT'=4.1868_J
 'kcal'=1000_cal
 'cd'=1
 'chain'=66_ftUS
 'Ci'=3.7e10_Bq
 'ct'=200_mg
 'cu'=1/16_gal (US cup)
 '°'=pi/180_r
 'd'=86400_s
 'dB'=1 (non-dimensional)
 'dyn'=1_g*cm/s^2
 'erg'=1_g*cm^2/s^2
 'eV'=1.6021766208e-19_J
 'F'=1_C/V
 '°F' IS A BASE UNIT BECAUSE IT'S INCONSISTENT UNLESS SPECIAL CASES
 'Δ°F'=1_Δ°R
 'fath'=6_ftUS
 'fbm'=144_in^3
 'fc'=1_lm/ft^2
 'Fdy'=9648.5332882498760256_C (per CODATA 2014)
 'fermi'=1_fm
 'flam'=1/pi_cd/ft^2
 'ft'=12_in'
 'ftUS'=1200/3937_m
 'g'=0.001_kg
 'ga'=9.80665_m/s^2
 'gal'=231_in^3
 'galC'='galUK'=0.00454609_m^3
 'galC'='galUK'=0.00454609_m^3
 'gf'=1_g*ga
 'grad'=pi/200_r
 'grain'=0.00006479891
 'Gy'=1_J/kg
 'H'=1_Wb/A
 'h'=3600_s
 'hp'=550_ft*lbf/s
 'Hz'=1/s
 'in'=0.0254_m
 'inHg'=13595.1_kg/m^3*in*ga (at 0°C)
 'inH2O'=999.972_kg/m^3*in*ga (at 4°C)
 'J'=1_N*m
 'K'=1
 'ΔK'=1_K
 'kip'=1000_lbf
 'knot'=1_nmi/h
 'kph'=1_km/h
 'l'=1_dm^3
 'lam'=10000/pi_cd/m^2
 'lb'=7000_grain
 'lbf'=1_lb*ga
 'lbt'=5760_grain
 'lm'=1_cd*sr
 'lx'=1_lm*m^2
 'lyr'=365.25_d*c
 'μ'=1_μm
 'mho'=1_A/V
 'mi'=5280_ft
 'mil'=0.001_in
 'min'=60_s
 'miUS'=5280_ftUS
 'mmHg'=1_13595.1_kg/m^3*mm*ga
 'mol'=1 (base unit)
 'gmol=1_mol
 'lbmol=453.59237_mol
 'mph'=1_mi/h
 'N'=1_kg*m/s^2
 'nmi'=1852_m
 'Ω'= 1_V/A
 'oz'= 437.5_grain
 'ozfl'= 1/128_gal
 'ozt'= 480_grain
 'ozUK'= 1/160_galUK
 'ozC'= 1/160_galC
 'P'=0.1_Pa*s
 'Pa'=1_N/m^2 = 1_kg/m/s^2
 'pc'=648000/pi_au
 'pdl'= 1_lb*ft/s^2
 'ph'= 1_lm/cm^2
 'pk'=1/4_bu
 'pkC'=1/4_buC
 'pkUK'=1/4_buUK
 'psi'=1_lbf/in^2
 'pt'=1/8_gal
 'ptC'=1/8_galC
 'ptUK'=1/8_galUK
 'qt'=1/4_gal
 'qtC'=1/4_galC
 'qtUK'=1/4_galUK
 'r'=1 (non-dimensional)
 'R'=2.58e-4_C/kg
 '°R'=5/9_K
 'Δ°R'=5/9_ΔK
 'rad'=0.01_Gy
 'rd'=16.5_ft
 'rdUS'=16.5_ftUS
 'qtUK'=1/4_galUK

 'rem'=0.01_m^2/s^2
 'rpm'=1_tr/min
 'S'=1_A/V
 'sb'=10000_cd/m^2
 'slug'=1_lb*s^2/ft*ga
 'sr'=1 (non-dimensional)
 'spat'=4*pi_sr
 'st'=1_m^3
 'St'=0.0001_m^2/s
 'Sv'=1_m^2/s^2
 't'=1000_kg
 'T'=1_kg/A/s^2
 'tbsp'=0.5_ozfl
 'therm'=100000_Btu
 'ton'=2000_lb
 'tonUK'=2240_lb
 'Torr'=1/760_atm
 'tr'=2*pi_r

 'tsp'=1/6_ozfl
 'u'= 1.660539040E-27_kg
 'V'=1_kg*m^2/A/s^3
 'W'=1_J/s=1_kg*m^2/s^3
 'Wb'=1_kg*m^2/A/s^2
 'yd'=3_ft
 'yr'=31556925.9747_s (tropical year)

 'π'= π0 = 3.141592..... (VARIABLE PRECISION)
 '?CDG'=180 (NON-DIMENSIONAL)
 '?CFT'=3937 (NON-DIMENSIONAL)
 '?CTO'=760 (NON-DIMENSIONAL)
Find all posts by this user
Quote this message in a reply
09-09-2016, 06:43 PM
Post: #12
RE: WP-34S galUS-> l Precision
(09-09-2016 08:05 AM)Paul Dale Wrote:  How does newRPL deal with unit conversions unrepresentable with decimal arithmetic?

Mustn't there be a precision loss involved with these using floating point arithmetic, even though they might be exact some of the time using rational arithmetic?



Pauli

Yes, there's a loss but operations are deferred to the last minute. For example, 1/7937 is stored as a "fake" unit that is defined as 7937, then if a unit needs a conversion of 1/7937, I just used that fake unit with a -1 exponent.
For newRPL this was an absolute must because of the variable precision in the system. If you set the system to 2000 digits, you expect 1/7937 to be represented with 2000 digits, so instead of trying to store them, they are computed at run time (you pay the price in speed, but you get the precision that's selected).
Find all posts by this user
Quote this message in a reply
09-10-2016, 01:51 PM
Post: #13
RE: WP-34S galUS-> l Precision
(09-07-2016 10:20 PM)Nick Wrote:  On firmware 43S 3.3[Print]3844 in the CONV menu:

Hi Paul. A bit off topic... is the current 34s version 3887?


Regards,

John
Find all posts by this user
Quote this message in a reply
09-10-2016, 05:22 PM
Post: #14
RE: WP-34S galUS-> l Precision
(09-10-2016 01:51 PM)John Smitherman Wrote:  
(09-07-2016 10:20 PM)Nick Wrote:  On firmware 43S 3.3[Print]3844 in the CONV menu:

Hi Paul. A bit off topic... is the current 34s version 3887?

I read mention in the release notes about the build numbers being off:

Quote:The displayed revision numbers in the VERS screen may differ between the
manual, the flash image and the emulator(s).

The number I referenced came from the hardware device.

The package I downloaded reads:

Quote:$Revision: 3844 $
$LastChangedDate: 2015-12-22 13:15:54 +0100 (Di, 22 Dez 2015) $
$LastChangedBy: mvcube $
Last Windows compile
Tue Dec 22 11:53:39 UTC 2015
Find all posts by this user
Quote this message in a reply
09-11-2016, 12:46 PM
Post: #15
RE: WP-34S galUS-> l Precision
Nick, here are links to build 3887 which was posted 28-2-2016:

https://sourceforge.net/p/wp34s/code/HEA...realbuild/

https://sourceforge.net/p/wp34s/code/3887/

I believe this is the latest.

Regards,

John
Find all posts by this user
Quote this message in a reply
09-11-2016, 04:11 PM
Post: #16
RE: WP-34S galUS-> l Precision
(09-11-2016 12:46 PM)John Smitherman Wrote:  Nick, here are links to build 3887 which was posted 28-2-2016:

https://sourceforge.net/p/wp34s/code/HEA...realbuild/

https://sourceforge.net/p/wp34s/code/3887/

I believe this is the latest.

Regards,

John

Thanks!
Find all posts by this user
Quote this message in a reply
11-27-2016, 03:12 PM (This post was last modified: 11-27-2016 03:12 PM by Dieter.)
Post: #17
RE: WP-34S galUS-> l Precision
(09-07-2016 10:20 PM)Nick Wrote:  The US Gallon has an exact value of 3.785411784 per:

1 yd (36 in) = 0.9144 m [international definition]
1 gal = 231 in^3 [US definition]

If that's accurate, can the precision be increased?

By simply changing the respective constant in the 34s source code. Technically this should be no problem at all. A source for the correct constant should not be hard to find. If everything else fails: HP correctly implements 3,785411784 l/gal in their calculators. I imagine my 35s is not the only one that does so. And, honestly, I think the 34s should be at least on par with it. ;-) So I agree it's time for a new build.

Dieter
Find all posts by this user
Quote this message in a reply
12-10-2016, 09:19 PM
Post: #18
RE: WP-34S galUS-> l Precision
(11-27-2016 03:12 PM)Dieter Wrote:  
(09-07-2016 10:20 PM)Nick Wrote:  The US Gallon has an exact value of 3.785411784 per:

1 yd (36 in) = 0.9144 m [international definition]
1 gal = 231 in^3 [US definition]

If that's accurate, can the precision be increased?

By simply changing the respective constant in the 34s source code. Technically this should be no problem at all. A source for the correct constant should not be hard to find. If everything else fails: HP correctly implements 3,785411784 l/gal in their calculators. I imagine my 35s is not the only one that does so. And, honestly, I think the 34s should be at least on par with it. ;-) So I agree it's time for a new build.

Dieter

Here's the source code containing the conversion constants: it's in the file compile_consts.c .
Code:

/* Imperial/metric conversions.
 * Data taken from http://physics.nist.gov/Pubs/SP811/appenB9.html
 * In general, the values are rounded to 6 or 7 digits even though
 * more accurate values are known for many of these.
 */
struct _constsml conversions[] = {
    CONV("kg",    "lb",        "KG_LBM",    "0.4535924"),        // source: NIST
    CONV("kg",    "stone",    "KG_STONE",    "6.3502936"),        // derived: 14 lbs to a stone
    CONV("kg",    "cwt",        "KG_CWT",    "50.8023488"),        // derived: 112lb to a long cwt
    CONV("kg",    "s.cwt",    "KG_SHCWT",    "45.35924"),        // source: NIST hundredweight, short 100lb
    CONV("g",    "oz",        "G_OZ",        "28.34952"),        // source: NIST
    CONV("g",    "tr.oz",    "G_TOZ",    "31.10348"),        // source: NIST
    CONV("l",    "galUK",    "L_GALUK",    "4.54609"),        // source: NIST
    CONV("l",    "galUS",    "L_GALUS",    "3.785412"),        // source: NIST
    CONV("l",    "cft",        "L_CUBFT",    "28.31685"),        // source: NIST
    CONV("ml",    "flozUK",    "ML_FLOZUK",    "28.41306"),        // source: NIST oz UK fluid
    CONV("ml",    "flozUS",    "ML_FLOZUS",    "29.57353"),        // source: NIST oz US fluid
    CONV("cm",    "inches",    "CM_INCH",    "2.54"),        // source: NIST
    CONV("m",    "fathom",    "M_FATHOM",    "1.8288"),        // derived: 6 feet
    CONV("m",    "feet",        "M_FEET",    "0.3048"),        // source: NIST
    CONV("m",    "feetUS",    "M_FEETUS",    "0.3048006096"),        // source: Wikipedia etc
    CONV("m",    "yards",    "M_YARD",    "0.9144"),        // source: NIST
    CONV("km",    "miles",    "KM_MILE",    "1.609344"),        // source: NIST
    CONV("km",    "l.y.",        "KM_LY",    "9.4607304725808E12"),        // source: IAU (see http://www.hpmuseum.org/forum/thread-2262.html)
    CONV("km",    "pc",        "KM_PC",    "3.085678E13"),        // source: NIST
    CONV("km",    "AU",        "KM_AU",    "149597900"),        // source: NIST, IAU 2009 gives 1.49597870700E11
    CONV("km",    "nmi",        "KM_NMI",    "1.852"),        // source: NIST
//    CONV("m\232",    "square",    "M_SQUARE",    "9.290304"),        // derived: 
//    CONV("m\232",    "perch",    "M_PERCH",    "25.29285264"),        // derived: 
    CONV("ha",    "acres",    "HA_ACREUK",    "0.40468564224"),    // derived: 43560 square feet
    CONV("ha",    "acreUS",    "HA_ACREUS",    "0.4046873"),        // source: NIST
    CONV("N",    "lbf",        "N_LBF",    "4.448222"),        // source: NIST
    CONV("J",    "Btu",        "J_BTU",    "1055.056"),        // source: NIST BTUit
    CONV("J",    "cal",        "J_CAL",    "4.1868"),        // source: NIST calorie it
    CONV("J",    "kWh",        "J_kWh",    "3600000"),        // source: NIST
    CONV("Pa",    "atm",        "Pa_ATM",    "101325"),        // source: NIST atmosphere standard
    CONV("Pa",    "bar",        "Pa_bar",    "100000"),        // source: NIST
    CONV("Pa",    "mmHg",        "Pa_mmHg",    "133.3224"),        // source: NIST cm mercury conventional
    CONV("Pa",    "psi",        "Pa_psi",    "6894.757"),        // source: NIST pound-force per square inch
    CONV("Pa",    "inHg",        "Pa_inhg",    "3386.389"),        // source: NIST inch of mercury conventional
    CONV("Pa",    "torr",        "Pa_torr",    "133.3224"),        // source: NIST
    CONV("W",    "hp(I)",    "W_HP550",    "745.6999"),        // source: NIST horsepower 550 ft . lb / s
    CONV("W",    "hp(M)",    "W_HP",        "735.4988"),        // source: NIST horsepower metric
    CONV("W",    "hp(E)",    "W_HPe",    "746"),            // source: NIST horsepower electric
    CONV("t",    "tons",        "T_TON",    "1.016047"),        // source: NIST ton, long 2240lb
    CONV("t",    "s.tons",    "T_SHTON",    "0.9071847"),        // source: NIST ton, short 2000lb

    CONV(NULL, NULL, NULL, NULL)
};
This code is processed to give single-precision (about 16 sf) conversion factors; there's no support in the code as it stands for double precision, but this shouldn't really be a problem.

What changes to the constants in this code would people like to see? If the changes are properly sourced perhaps Paul would replace the code above with the new improved version; if not, I could include the new code as a compile-time option and build a version of the firmware using it.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
12-10-2016, 11:19 PM
Post: #19
RE: WP-34S galUS-> l Precision
(12-10-2016 09:19 PM)Nigel (UK) Wrote:  What changes to the constants in this code would people like to see? If the changes are properly sourced perhaps Paul would replace the code above with the new improved version; if not, I could include the new code as a compile-time option and build a version of the firmware using it.

I'm happy to improve accuracy from credible sources.

I'm not so interested in adding additional conversions.


Pauli
Find all posts by this user
Quote this message in a reply
12-11-2016, 01:24 PM
Post: #20
RE: WP-34S galUS-> l Precision
I couldn't resist having a go myself! Below is my modified list of conversion factors; I've tried to be clear from where each has come. I've left the original ones in, commented out, so that the two can be compared.

So far as I know, all of these are either exact or correct to 16sf.

Code:

struct _constsml conversions[] = {
//    CONV("kg",    "lb",        "KG_LBM",    "0.4535924"),        // source: NIST
    CONV("kg",    "lb",        "KG_LBM",    "0.45359237"),        // source: NIST; exact
    
//    CONV("kg",    "stone",    "KG_STONE",    "6.3502936"),        // derived: 14 lbs to a stone
    CONV("kg",    "stone",    "KG_STONE",    "6.35029318"),        // derived: 14 lbs to a stone using exact lb; exact

//    CONV("kg",    "cwt",        "KG_CWT",    "50.8023488"),        // derived: 112lb to a long cwt
    CONV("kg",    "cwt",        "KG_CWT",    "50.80234544"),        // derived: 112lb to a long cwt using exact lb;exact

//    CONV("kg",    "s.cwt",    "KG_SHCWT",    "45.35924"),        // source: NIST hundredweight, short 100lb
    CONV("kg",    "s.cwt",    "KG_SHCWT",    "45.359237"),        // source: NIST hundredweight, short 100lb using exact lb; exact

//    CONV("g",    "oz",        "G_OZ",        "28.34952"),        // source: NIST
    CONV("g",    "oz",        "G_OZ",        "28.349523125"),        // source: NIST; 16oz to 1 lb using exact lb

//    CONV("g",    "tr.oz",    "G_TOZ",    "31.10348"),        // source: NIST
    CONV("g",    "tr.oz",    "G_TOZ",    "31.1034768"),        // source: NIST; 1 tr.oz = 480 grains; 1 lb = 7000 grains exactly; exact

    CONV("l",    "galUK",    "L_GALUK",    "4.54609"),        // source: NIST; also UK Weights and Measures act 1985; exact

//    CONV("l",    "galUS",    "L_GALUS",    "3.785412"),        // source: NIST
    CONV("l",    "galUS",    "L_GALUS",    "3.785411784"),        // source: NIST handbook 44 2017 appendix C; exact

//    CONV("l",    "cft",        "L_CUBFT",    "28.31685"),        // source: NIST
    CONV("l",    "cft",        "L_CUBFT",    "28.316846592"),        // source: 1 inch = 0.0254 m; exact

//    CONV("ml",    "flozUK",    "ML_FLOZUK",    "28.41306"),        // source: NIST oz UK fluid
    CONV("ml",    "flozUK",    "ML_FLOZUK",    "28.4130625"),        // source: 1 ukgallon = 8 pints; 1 pint = 20 flozuk; see above for exact ukgallon; exact

//    CONV("ml",    "flozUS",    "ML_FLOZUS",    "29.57353"),        // source: NIST oz US fluid
    CONV("ml",    "flozUS",    "ML_FLOZUS",    "29.5735295625"),        // source: NIST handbook 44 2017 appendix C; 1 floz = 1.8046875 in^3; exact

    CONV("cm",    "inches",    "CM_INCH",    "2.54"),        // source: NIST; exact already

    CONV("m",    "fathom",    "M_FATHOM",    "1.8288"),        // derived: 6 feet; exact

    CONV("m",    "feet",        "M_FEET",    "0.3048"),        // source: NIST; exact

//    CONV("m",    "feetUS",    "M_FEETUS",    "0.3048006096"),        // source: Wikipedia etc;
    CONV("m",    "feetUS",    "M_FEETUS",    "0.3048006096012192"),        // source: Wikipedia etc; usfoot = survey foot = 1200/3937 m exactly; number given is correct to 16sf

    CONV("m",    "yards",    "M_YARD",    "0.9144"),        // source: NIST; exact

    CONV("km",    "miles",    "KM_MILE",    "1.609344"),        // source: NIST; exact

    CONV("km",    "l.y.",        "KM_LY",    "9.4607304725808E12"),        // source: IAU (see http://www.hpmuseum.org/forum/thread-2262.html); exact

//    CONV("km",    "pc",        "KM_PC",    "3.085678E13"),        // source: NIST
    CONV("km",    "pc",        "KM_PC",    "3.085677581491367E13"),        // source: August 2015 IAU Resolution B2 defines parsec as 648000/pi AU; uses AU below; correct to 16sf

//    CONV("km",    "AU",        "KM_AU",    "149597900"),        // source: NIST, IAU 2009 gives 1.49597870700E11
    CONV("km",    "AU",        "KM_AU",    "149597870.7"),        // source: NIST, IAU 2009 gives 1.49597870700E11; value changed to this exact definition

    CONV("km",    "nmi",        "KM_NMI",    "1.852"),        // source: NIST; exact

//    CONV("m\232",    "square",    "M_SQUARE",    "9.290304"),        // derived: 
//    CONV("m\232",    "perch",    "M_PERCH",    "25.29285264"),        // derived: 

    CONV("ha",    "acres",    "HA_ACREUK",    "0.40468564224"),    // derived: 43560 square feet; exact

//    CONV("ha",    "acreUS",    "HA_ACREUS",    "0.4046873"),        // source: NIST
    CONV("ha",    "acreUS",    "HA_ACREUS",    "0.4046872609874252"),        // source: NIST; using exact definition of survey foot correct to 16sf

//    CONV("N",    "lbf",        "N_LBF",    "4.448222"),        // source: NIST
    CONV("N",    "lbf",        "N_LBF",    "4.4482216152605"),        // source: using g (standard) = 9.80665 N/kg from NIST constants and exact value for mass of 1lb; exact

//    CONV("J",    "Btu",        "J_BTU",    "1055.056"),        // source: NIST BTUit
    CONV("J",    "Btu",        "J_BTU",    "1055.05585262"),        // source: NIST; 1BTU = heat needed to raise temp of 1 lb water by 1 degF; using exact pound and calorie values gives result above

    CONV("J",    "cal",        "J_CAL",    "4.1868"),        // source: NIST calorie it (International Steam Table calorie); exact

    CONV("J",    "kWh",        "J_kWh",    "3600000"),        // source: NIST; exact

    CONV("Pa",    "atm",        "Pa_ATM",    "101325"),        // source: NIST atmosphere standard; exact

    CONV("Pa",    "bar",        "Pa_bar",    "100000"),        // source: NIST; exact

//    CONV("Pa",    "mmHg",        "Pa_mmHg",    "133.3224"),        // source: NIST cm mercury conventional
    CONV("Pa",    "mmHg",        "Pa_mmHg",    "133.322387415"),        // source: Wikipedia refers to BS 350: Part 1: 1974 - Conversion factors and tables. British Standards Institution. 1974. p. 49; exact

//    CONV("Pa",    "psi",        "Pa_psi",    "6894.757"),        // source: NIST pound-force per square inch
    CONV("Pa",    "psi",        "Pa_psi",    "6894.757293168361"),        // source: NIST pound-force per square inch; uses value for lbF above; correct to 16sf

//    CONV("Pa",    "inHg",        "Pa_inhg",    "3386.389"),        // source: NIST inch of mercury conventional
    CONV("Pa",    "inHg",        "Pa_inhg",    "3386.388640341"),        // source: NIST inch of mercury conventional; see mmHg above; exact

//    CONV("Pa",    "torr",        "Pa_torr",    "133.3224"),        // source: NIST
    CONV("Pa",    "torr",        "Pa_torr",    "133.3223684210526"),        // source: NIST; 101325/760 is exact value; corect to 16sf

//    CONV("W",    "hp(I)",    "W_HP550",    "745.6999"),        // source: NIST horsepower 550 ft . lb / s
    CONV("W",    "hp(I)",    "W_HP550",    "745.6998715822702"),        // source: NIST horsepower 550 ft . lb / s; using standard g; correct to 16sf

//    CONV("W",    "hp(M)",    "W_HP",        "735.4988"),        // source: NIST horsepower metric
    CONV("W",    "hp(M)",    "W_HP",        "735.49875"),        // source: NIST horsepower metric (lifting 75kg 1m in 1s) using standard g; exact

    CONV("W",    "hp(E)",    "W_HPe",    "746"),            // source: NIST horsepower electric; exact

//    CONV("t",    "tons",        "T_TON",    "1.016047"),        // source: NIST ton, long 2240lb
    CONV("t",    "tons",        "T_TON",    "1.0160469088"),        // source: NIST ton, long 2240lb; using exact lb; exact

//    CONV("t",    "s.tons",    "T_SHTON",    "0.9071847"),        // source: NIST ton, short 2000lb
    CONV("t",    "s.tons",    "T_SHTON",    "0.90718474"),        // source: NIST ton, short 2000lb; using exact lb; exact

    CONV(NULL, NULL, NULL, NULL)
};

Nigel (UK)
Find all posts by this user
Quote this message in a reply
Post Reply 




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