Post Reply 
Constants aren't so constant [SOLVED]
12-05-2016, 04:30 PM (This post was last modified: 12-05-2016 04:34 PM by sat1410.)
Post: #3
RE: Constants aren't so constant
I used the 2014 CODATA values in http://physics.nist.gov/cuu/Constants/Ta...lascii.txt
In cases where there were a different number of digits in the NIST vs. existing HP code, I used NIST values.

Also, one small error noted in the pdf manual on the HP support site (2nd edition, Sept 2016, DPN 813269-002):
Under the list on constants on page 499, in the chemistry section, the manual says "Boltmann, k" as one of the constants. Should be 'Boltzmann' (z is missing).

Hope these quick changes are useful.

Code:
  /// These values come from the NIST 2014 published values
  static struct { u32 StringId; wchar_t symbol[5]; HP_Real value; wchar_t unit[15]; } const constants[]={
    { SIDConstant_NA    ,L"NA"             ,HPREAL(+,6022140857,23)     ,L"(1/mol)"      },
    { SIDConstant_k     ,L"k"              ,HPREAL(+,138064852,-23)     ,L"(J/K)"       },
    { SIDConstant_Vm    ,L"Vm"             ,HPREAL(+,22413962,1)        ,L"(l/mol)"      },
    { SIDConstant_R     ,L"R"              ,HPREAL(+,83144598,0)        ,L"(J/(mol*K))"    },
    { SIDConstant_StdT  ,L"StdT"           ,HPREAL(+,27315,2)           ,L"K"          },
    { SIDConstant_StdP  ,L"StdP"           ,HPREAL(+,101325,2)          ,L"kPa"        },

    { SIDConstant_Sigma ,L"\u03C3"         ,HPREAL(+,5670367,-8)        ,L"(W/(m^2*K^4))"    },
    { SIDConstant_c     ,L"c"              ,HPREAL(+,299792458,8)       ,L"(m/s)"        },
    { SIDConstant_e0    ,L"\u03B5\u2080"   ,HPREAL(+,8854187817,-12)    ,L"(F/m)"        },
    { SIDConstant_m0    ,L"\u03BC\u2080"   ,HPREAL(+,12566370614,-6)    ,L"(H/m)"        },
    { SIDConstant_g     ,L"g"              ,HPREAL(+,980665,0)          ,L"(m/(s^2))"       },
    { SIDConstant_G     ,L"G"              ,HPREAL(+,667408,-11)        ,L"(m^3/(s^2*kg))"   },

    { SIDConstant_h     ,L"h"              ,HPREAL(+,6626070040,-34)    ,L"(J*s)"        },
    { SIDConstant_hBar  ,L"\u0127"         ,HPREAL(+,1054571800,-34)    ,L"(J*s)"        },
    { SIDConstant_q     ,L"q"              ,HPREAL(+,16021766208,-19)   ,L"C"          },
    { SIDConstant_me    ,L"me"             ,HPREAL(+,910938356,-31)     ,L"kg"         },
    { SIDConstant_qme   ,L"qme"            ,HPREAL(+,1758820024,11)     ,L"(C/kg)"       },
    { SIDConstant_mp    ,L"mp"             ,HPREAL(+,1672621898,-27)    ,L"kg"         },
    { SIDConstant_mpme  ,L"mpme"           ,HPREAL(+,183615267389,3)    ,NULL           },
    { SIDConstant_alpha ,L"\u03B1"         ,HPREAL(+,72973525664,-3)    ,NULL           },
    { SIDConstant_phi   ,L"\u03C6\u2080"   ,HPREAL(+,2067833831,-15)    ,L"Wb"         },
    { SIDConstant_F     ,L"F"              ,HPREAL(+,9648533289,4)      ,L"(C/mol)"      },
    { SIDConstant_Rinf  ,L"R\u221E"        ,HPREAL(+,10973731568508,7)  ,L"(1/m)"        },
    { SIDConstant_a0    ,L"a\u2080"        ,HPREAL(+,52917721067,-11)   ,L"m"         },
    { SIDConstant_mB    ,L"\u03BCB"        ,HPREAL(+,9274009994,-24)    ,L"(J/T)"        },
    { SIDConstant_mN    ,L"\u03BCN"        ,HPREAL(+,5050783699,-27)    ,L"(J/T)"        },
    { SIDConstant_l0    ,L"\u03BB\u2080"   ,HPREAL(+,12398419739,-6)    ,L"m"         },
    { SIDConstant_f0    ,L"f\u2080"        ,HPREAL(+,2417989262,14)     ,L"Hz"         },
    { SIDConstant_lc    ,L"\u03BBc"        ,HPREAL(+,24263102367,-12)   ,L"m"         } };
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Constants aren't so constant - sat1410 - 12-05-2016 04:30 PM
RE: Constants aren't so constant - JMB - 12-05-2016, 05:21 PM
RE: Constants aren't so constant - JMB - 01-14-2018, 12:48 PM
RE: Constants aren't so constant - JimP - 01-15-2018, 04:12 AM
RE: Constants aren't so constant - pier4r - 01-15-2018, 03:46 PM
RE: Constants aren't so constant - JMB - 01-16-2018, 07:01 PM



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