Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2409/example Modified Files: unit_example_10.cpp unit_example_14.cpp unit_example_19.cpp unit_example_20.cpp unit_example_22.cpp unit_example_4.cpp Log Message: temperature conversion code added Index: unit_example_10.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_10.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- unit_example_10.cpp 29 Mar 2007 22:57:45 -0000 1.3 +++ unit_example_10.cpp 2 Apr 2007 21:28:40 -0000 1.4 @@ -80,16 +80,16 @@ std::stringstream sstream1, sstream2; //[unit_example_10_snippet_1 - quantity<angle::degree> thetad((180.0/6.0)*degrees); - quantity<angle::gradian> thetag((200.0/6.0)*gradians); - quantity<angle::radian> thetar((3.1415926/6.0)*radians); + quantity<angles::degrees::degree> thetad((180.0/6.0)*degrees); + quantity<angles::gradians::gradian> thetag((200.0/6.0)*gradians); + quantity<angles::radians::radian> thetar((3.1415926/6.0)*radians); //] /// test cos { - quantity<angle::dimensionless_degree> cos_thetad(cos(thetad)); - quantity<angle::dimensionless_gradian> cos_thetag(cos(thetag)); - quantity<angle::dimensionless_radian> cos_thetar(cos(thetar)); + quantity<angles::degrees::dimensionless> cos_thetad(cos(thetad)); + quantity<angles::gradians::dimensionless> cos_thetag(cos(thetag)); + quantity<angles::radians::dimensionless> cos_thetar(cos(thetar)); sstream1 << "thetad = " << thetad << std::endl << "thetag = " << thetag << std::endl @@ -106,9 +106,9 @@ /// test sin { - quantity<angle::dimensionless_degree> sin_thetad(sin(thetad)); - quantity<angle::dimensionless_gradian> sin_thetag(sin(thetag)); - quantity<angle::dimensionless_radian> sin_thetar(sin(thetar)); + quantity<angles::degrees::dimensionless> sin_thetad(sin(thetad)); + quantity<angles::gradians::dimensionless> sin_thetag(sin(thetag)); + quantity<angles::radians::dimensionless> sin_thetar(sin(thetar)); sstream1 << "thetad = " << thetad << std::endl << "thetag = " << thetag << std::endl @@ -125,9 +125,9 @@ /// test tan { - quantity<angle::dimensionless_degree> tan_thetad(tan(thetad)); - quantity<angle::dimensionless_gradian> tan_thetag(tan(thetag)); - quantity<angle::dimensionless_radian> tan_thetar(tan(thetar)); + quantity<angles::degrees::dimensionless> tan_thetad(tan(thetad)); + quantity<angles::gradians::dimensionless> tan_thetag(tan(thetag)); + quantity<angles::radians::dimensionless> tan_thetar(tan(thetar)); sstream1 << "thetad = " << thetad << std::endl << "thetag = " << thetag << std::endl Index: unit_example_14.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_14.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- unit_example_14.cpp 16 Mar 2007 18:29:52 -0000 1.1.1.1 +++ unit_example_14.cpp 2 Apr 2007 21:28:40 -0000 1.2 @@ -26,7 +26,7 @@ @endverbatim **/ - +/* #include <iostream> #include <cstdlib> @@ -187,3 +187,145 @@ return 0; } +*/ +// mcs::units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2007 Matthias Christian Schabel +// Copyright (C) 2007 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <cstdlib> +#include <ctime> +#include <algorithm> + +#include <boost/timer.hpp> +#include <boost/numeric/ublas/matrix.hpp> +#include <boost/units/quantity.hpp> +#include <boost/units/systems/si.hpp> + +enum { + tile_block_size = 16 +}; + +template<class T0, class T1, class Out> +void tiled_multiply_carray_inner(T0* first, T1* second, Out* out, int totalwidth, int width2, int height1, int common) { + for(int j = 0; j < height1; ++j) { + for(int i = 0; i < width2; ++i) { + Out value = out[j * totalwidth + i]; + for(int k = 0; k < common; ++k) { + value += first[k + totalwidth * j] * second[k * totalwidth + i]; + } + out[j * totalwidth + i] = value; + } + } +} + +template<class T0, class T1, class Out> +void tiled_multiply_carray_outer(T0* first, T1* second, Out* out, int width2, int height1, int common) { + std::fill_n(out, width2 * height1, Out()); + int j = 0; + for(; j < height1 - tile_block_size; j += tile_block_size) { + int i = 0; + for(; i < width2 - tile_block_size; i += tile_block_size) { + int k = 0; + for(; k < common - tile_block_size; k += tile_block_size) { + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, tile_block_size, tile_block_size, tile_block_size); + } + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, tile_block_size, tile_block_size, common - k); + } + int k = 0; + for(; k < common - tile_block_size; k += tile_block_size) { + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, width2 - i, tile_block_size, tile_block_size); + } + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, width2 - i, tile_block_size, common - k); + } + int i = 0; + for(; i < width2 - tile_block_size; i += tile_block_size) { + int k = 0; + for(; k < common - tile_block_size; k += tile_block_size) { + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, tile_block_size, height1 - j, tile_block_size); + } + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, tile_block_size, height1 - j, common - k); + } + int k = 0; + for(; k < common - tile_block_size; k += tile_block_size) { + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, width2 - i, height1 - j, tile_block_size); + } + tiled_multiply_carray_inner(&first[k + width2 * j], &second[k * width2 + i], &out[j * width2 + i], width2, width2 - i, height1 - j, common - k); +} + +enum { max_value = 1000}; + +int main() { + boost::numeric::ublas::matrix<double> ublas_result; + { + boost::numeric::ublas::matrix<double> m1(max_value, max_value); + boost::numeric::ublas::matrix<double> m2(max_value, max_value); + std::srand(1492); + for(int i = 0; i < max_value; ++i) { + for(int j = 0; j < max_value; ++j) { + m1(i,j) = std::rand(); + m2(i,j) = std::rand(); + } + } + boost::timer timer; + ublas_result = (prod(m1, m2)); + std::cout << timer.elapsed() << " seconds" << std::endl; + } + boost::numeric::ublas::matrix<boost::units::quantity<boost::units::SI::dimensionless> > ublas_resultq; + { + boost::numeric::ublas::matrix<boost::units::quantity<boost::units::SI::dimensionless> > m1(max_value, max_value); + boost::numeric::ublas::matrix<boost::units::quantity<boost::units::SI::dimensionless> > m2(max_value, max_value); + std::srand(1492); + for(int i = 0; i < max_value; ++i) { + for(int j = 0; j < max_value; ++j) { + m1(i,j) = std::rand(); + m2(i,j) = std::rand(); + } + } + boost::timer timer; + ublas_resultq = (prod(m1, m2)); + std::cout << timer.elapsed() << " seconds" << std::endl; + } + std::vector<double> cresult(max_value * max_value); + { + std::vector<double> m1(max_value * max_value); + std::vector<double> m2(max_value * max_value); + std::srand(1492); + for(int i = 0; i < max_value * max_value; ++i) { + m1[i] = std::rand(); + m2[i] = std::rand(); + } + //std::vector<double> m3(max_value * max_value); + boost::timer timer; + tiled_multiply_carray_outer(&m1[0], &m2[0], &cresult[0], max_value, max_value, max_value); + //multiply_carray(&m1[0], &m2[0], &cresult[0], max_value, max_value, max_value); + std::cout << timer.elapsed() << " seconds" << std::endl; + } + std::vector<boost::units::quantity<boost::units::SI::energy> > cresultq(max_value * max_value); + { + std::vector<boost::units::quantity<boost::units::SI::force> > m1(max_value * max_value); + std::vector<boost::units::quantity<boost::units::SI::length> > m2(max_value * max_value); + std::srand(1492); + for(int i = 0; i < max_value * max_value; ++i) { + m1[i] = std::rand() * boost::units::SI::newtons; + m2[i] = std::rand() * boost::units::SI::meters; + } + boost::timer timer; + tiled_multiply_carray_outer(&m1[0], &m2[0], &cresultq[0], max_value, max_value, max_value); + std::cout << timer.elapsed() << " seconds" << std::endl; + } + for(int i = 0; i < max_value; ++i) { + for(int j = 0; j < max_value; ++j) { + if(std::abs(ublas_result(i,j) - cresult[i * max_value + j]) > .000001) { + std::cout << "i = " << i << ", j = " << j << std::endl; + std::cout << "ublas = " << ublas_result(i,j) << ", c = " << cresult[i * max_value + j] << std::endl; + return(EXIT_FAILURE); + } + } + } +} \ No newline at end of file Index: unit_example_20.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_20.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- unit_example_20.cpp 30 Mar 2007 23:50:10 -0000 1.3 +++ unit_example_20.cpp 2 Apr 2007 21:28:40 -0000 1.4 @@ -45,89 +45,7 @@ #include <boost/units/detail/utility.hpp> using namespace boost::units; -/* -template<class Y = double> -class absolute -{ - public: - typedef absolute<Y> this_type; - typedef Y value_type; - - absolute() : val_() { } - absolute(const value_type& val) : val_(val) { } - absolute(const this_type& p) : val_(p.val_) { } - - value_type& value() { return val_; } - const value_type& value() const { return val_; } - - private: - Y val_; -}; - -template<class Y = double> -class relative -{ - public: - typedef relative<Y> this_type; - typedef Y value_type; - - relative() : val_() { } - relative(const value_type& val) : val_(val) { } - relative(const this_type& v) : val_(v.val_) { } - - value_type& value() { return val_; } - const value_type& value() const { return val_; } - - private: - Y val_; -}; - -template<class Y> -absolute<Y> operator+(const absolute<Y>& p,const relative<Y>& v) -{ - return absolute<Y>(p.value()+v.value()); -} -template<class Y> -absolute<Y> operator-(const absolute<Y>& p,const relative<Y>& v) -{ - return absolute<Y>(p.value()-v.value()); -} - -template<class Y> -relative<Y> operator-(const absolute<Y>& p1,const absolute<Y>& p2) -{ - return relative<Y>(p1.value()-p2.value()); -} - -template<class Y> -relative<Y> operator+(const relative<Y>& v1,const relative<Y>& v2) -{ - return relative<Y>(v1.value()+v2.value()); -} - -template<class Y> -relative<Y> operator-(const relative<Y>& v1,const relative<Y>& v2) -{ - return relative<Y>(v1.value()-v2.value()); -} - -template<class Y> -std::ostream& operator<<(std::ostream& os,const absolute<Y>& p) -{ - os << "{ " << p.value() << " }"; - - return os; -} - -template<class Y> -std::ostream& operator<<(std::ostream& os,const relative<Y>& v) -{ - os << "[ " << v.value() << " ]"; - - return os; -} -*/ namespace boost { namespace units { Index: unit_example_22.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_22.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit_example_22.cpp 29 Mar 2007 19:39:28 -0000 1.2 +++ unit_example_22.cpp 2 Apr 2007 21:28:40 -0000 1.3 @@ -121,6 +121,7 @@ return 0; } */ +/* #include <iostream> #include <boost/units/io.hpp> #include <boost/units/systems/si.hpp> @@ -178,6 +179,118 @@ return 0; } +*/ +/* +#include <iostream> +#include <boost/units/io.hpp> +#include <boost/units/systems/si.hpp> +#include <boost/units/systems/cgs.hpp> +#include <boost/units/systems/si/prefixes.hpp> + +using namespace boost::units; + +template<class System,class Y> +typeof(quantity<unit<length_type,System>,Y>()*quantity<unit<length_type,System>,Y>()) +compute_area(const quantity<unit<length_type,System>,Y>& L) +{ + return L*L; +} + +int main() +{ + std::cout << compute_area(2.0*SI::meters) << std::endl + << compute_area(20.0*root<2>(SI::meters)*root<2>(CGS::centimeters)) << std::endl + << quantity<SI::area>(compute_area(20.0*root<2>(SI::meters)*root<2>(CGS::centimeters))) << std::endl + << std::endl; + + return 0; +} +*/ +#include <iostream> + +#include <boost/units/io.hpp> +#include <boost/units/absolute.hpp> +#include <boost/units/systems/si/temperature.hpp> +#include <boost/units/systems/temperature/celsius.hpp> +#include <boost/units/systems/temperature/fahrenheit.hpp> +#include <boost/units/systems/conversions/conversion_headers.hpp> + +using namespace boost::units; + +int main() +{ + quantity<SI::temperature> KTR(273.16*SI::kelvin); + quantity<SI::temperature,absolute<> > KTA(absolute<>(273.16)*SI::kelvin); + + std::cout << KTR << std::endl + << KTA << std::endl + << std::endl; + + quantity<celsius::temperature> CTR(0.0*celsius::degrees); + quantity<celsius::temperature,absolute<> > CTA(absolute<>(0.0)*celsius::degrees); + + std::cout << CTR << std::endl + << CTA << std::endl + << std::endl; + + quantity<fahrenheit::temperature> FTR(32.0*fahrenheit::degrees); + quantity<fahrenheit::temperature,absolute<> > FTA(absolute<>(32.0)*fahrenheit::degrees); + + std::cout << FTR << std::endl + << FTA << std::endl + << std::endl; + + // kelvin->celsius + quantity<celsius::temperature> CTR2(KTR); + quantity<celsius::temperature,absolute<> > CTA2(KTA); + + std::cout << KTR << " = " << CTR2 << std::endl + << KTA << " = " << CTA2 << std::endl + << std::endl; + + // celsius->kelvin + quantity<SI::temperature> KTR2(CTR); + quantity<SI::temperature,absolute<> > KTA2(CTA); + + std::cout << CTR << " = " << KTR2 << std::endl + << CTA << " = " << KTA2 << std::endl + << std::endl; + + // kelvin->fahrenheit + quantity<celsius::temperature> FTR2(KTR); + quantity<celsius::temperature,absolute<> > FTA2(KTA); + + std::cout << KTR << " = " << FTR2 << std::endl + << KTA << " = " << FTA2 << std::endl + << std::endl; + + // fahrenheit->kelvin + quantity<SI::temperature> KTR3(FTR); + quantity<SI::temperature,absolute<> > KTA3(FTA); + + std::cout << FTR << " = " << KTR3 << std::endl + << FTA << " = " << KTA3 << std::endl + << std::endl; + + // fahrenheit->celsius + quantity<celsius::temperature> CTR3(FTR); + quantity<celsius::temperature,absolute<> > CTA3(FTA); + + std::cout << FTR << " = " << CTR3 << std::endl + << FTA << " = " << CTA3 << std::endl + << std::endl; + + // celsius->fahrenheit + quantity<fahrenheit::temperature> FTR3(CTR); + quantity<fahrenheit::temperature,absolute<> > FTA3(CTA); + + std::cout << CTR << " = " << FTR3 << std::endl + << CTA << " = " << FTA3 << std::endl + << std::endl; + + return 0; +} + Index: unit_example_4.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_4.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- unit_example_4.cpp 30 Mar 2007 23:50:10 -0000 1.3 +++ unit_example_4.cpp 2 Apr 2007 21:28:40 -0000 1.4 @@ -43,7 +43,7 @@ U1/U1 : dimensionless U1*U2 : m^3 kg^2 s^(-4) U1/U2 : m^(-1) -U1^X : m^2 kg^2 s^(-4) +U1^X : m^2 kg^2 s^(-4) X1vU1 : m^(1/2) kg^(1/2) s^(-1) U1^X2 : m^(4/3) kg^(4/3) s^(-8/3) X2vU1 : m^(3/4) kg^(3/4) s^(-3/2) @@ -262,7 +262,7 @@ //<< "U1-U2 : " << u1-u2 << std::endl // illegal << "U1*U2 : " << u1*u2 << std::endl << "U1/U2 : " << u1/u2 << std::endl - << "U1^X : " << pow<2>(u1) << std::endl + << "U1^X : " << pow<2>(u1) << std::endl << "X1vU1 : " << root<2>(u1) << std::endl << "U1^X2 : " << pow<static_rational<4,3> >(u1) << std::endl << "X2vU1 : " << root<static_rational<4,3> >(u1) << std::endl @@ -443,7 +443,7 @@ sstream2 << "U1/U1 : dimensionless" << std::endl; sstream2 << "U1*U2 : m^3 kg^2 s^(-4)" << std::endl; sstream2 << "U1/U2 : m^(-1)" << std::endl; - sstream2 << "U1^X : m^2 kg^2 s^(-4)" << std::endl; + sstream2 << "U1^X : m^2 kg^2 s^(-4)" << std::endl; sstream2 << "X1vU1 : m^(1/2) kg^(1/2) s^(-1)" << std::endl; sstream2 << "U1^X2 : m^(4/3) kg^(4/3) s^(-8/3)" << std::endl; sstream2 << "X2vU1 : m^(3/4) kg^(3/4) s^(-3/2)" << std::endl; Index: unit_example_19.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_19.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- unit_example_19.cpp 1 Apr 2007 17:32:51 -0000 1.3 +++ unit_example_19.cpp 2 Apr 2007 21:28:40 -0000 1.4 @@ -24,150 +24,149 @@ Universal constants: -c : 2.99792e+08 m s^(-1) -mu_0 : 1.25664e-06 m kg s^(-2) A^(-2) -epsilon_0 : 8.85419e-12 m^(-3) kg^(-1) s^4 A^2 -Z_0 : 376.73 m^2 kg s^(-3) A^(-2) -G : 6.6742e-11 m^3 kg^(-1) s^(-2) -h : 6.62607e-34 m^2 kg s^(-1) -hbar : 1.05457e-34 m^2 kg s^(-1) -m_P : 2.17645e-08 kg -T_P : 1.41679e+32 K -l_P : 1.61624e-35 m -t_P : 5.39121e-44 s +c : 2.9979245800000e+08 (exact) m s^(-1) +mu_0 : 1.2566370614359e-06 (exact) m kg s^(-2) A^(-2) +epsilon_0 : 8.8541878176204e-12 (exact) m^(-3) kg^(-1) s^4 A^2 +Z_0 : 3.7673031346177e+02 (exact) m^2 kg s^(-3) A^(-2) +G : 6.6742800000000e-11 (rel. unc. = 1.0e-04) m^3 kg^(-1) s^(-2) +h : 6.6260689600000e-34 (rel. unc. = 5.0e-08) m^2 kg s^(-1) +hbar : 1.0545716280000e-34 (rel. unc. = 5.0e-08) m^2 kg s^(-1) +m_P : 2.1764400000000e-08 (rel. unc. = 5.1e-05) kg +T_P : 1.4167850000000e+32 (rel. unc. = 5.0e-05) K +l_P : 1.6162520000000e-35 (rel. unc. = 5.0e-05) m +t_P : 5.3912400000000e-44 (rel. unc. = 5.0e-05) s Electromagnetic constants: -e : 1.60218e-19 s A -e/h : 2.41799 m^(-2) kg^(-1) s^2 A -Phi_0 : 2.06783 m^2 kg s^(-2) A^(-1) -G_0 : 7.74809e-05 m^(-2) kg^(-1) s^3 A^2 -K_J : 4.83598e+14 m^(-2) kg^(-1) s^2 A -R_K : 25812.8 m^2 kg s^(-3) A^(-2) -mu_B : 9.27401e-24 m^2 A -mu_N : 5.05078e-27 m^2 A +e : 1.6021764870000e-19 (rel. unc. = 2.5e-08) s A +e/h : 2.4179894540000e+14 (rel. unc. = 2.5e-08) m^(-2) kg^(-1) s^2 A +Phi_0 : 2.0678336670000e-15 (rel. unc. = 2.5e-08) m^2 kg s^(-2) A^(-1) +G_0 : 7.7480917004000e-05 (rel. unc. = 6.8e-10) m^(-2) kg^(-1) s^3 A^2 +K_J : 4.8359789100000e+14 (rel. unc. = 2.5e-08) m^(-2) kg^(-1) s^2 A +R_K : 2.5812807557000e+04 (rel. unc. = 6.9e-10) m^2 kg s^(-3) A^(-2) +mu_B : 9.2740091500000e-24 (rel. unc. = 2.5e-08) m^2 A +mu_N : 5.0507832400000e-27 (rel. unc. = 2.6e-08) m^2 A Physico-chemical constants: -N_A : 6.02214e+23 mol^(-1) -m_u : 1.66054e-27 kg -F : 96485.3 s A mol^(-1) -R : 8.31447 m^2 kg s^(-2) K^(-1) mol^(-1) -k_B : 1.38065e-23 m^2 kg s^(-2) K^(-1) -V_m : 0.022414 m^3 mol^(-1) -sigma_SB : 5.6704e-08 kg s^(-3) K^(-4) -c_1 : 3.74177e-16 m^4 kg s^(-3) -c_2 : 0.0143878 m K -b : 0.00289777 m K +N_A : 6.0221417900000e+23 (rel. unc. = 5.0e-08) mol^(-1) +m_u : 1.6605387820000e-27 (rel. unc. = 5.0e-08) kg +F : 9.6485339900000e+04 (rel. unc. = 2.5e-08) s A mol^(-1) +R : 8.3144720000000e+00 (rel. unc. = 1.8e-06) m^2 kg s^(-2) K^(-1) mol^(-1) +k_B : 1.3806504000000e-23 (rel. unc. = 1.7e-06) m^2 kg s^(-2) K^(-1) +V_m : 2.2413996000000e-02 (rel. unc. = 1.7e-06) m^3 mol^(-1) +sigma_SB : 5.6704000000000e-08 (rel. unc. = 7.1e-06) kg s^(-3) K^(-4) +c_1 : 3.7417711800000e-16 (rel. unc. = 5.1e-08) m^4 kg s^(-3) +c_2 : 1.4387752000000e-02 (rel. unc. = 1.7e-06) m K +b : 2.8977685000000e-03 (rel. unc. = 1.8e-06) m K Atomic and nuclear constants: -alpha : 0.00729735 dimensionless -R_infinity : 1.09737e+07 m^(-1) -a_0 : 5.29177e-11 m -E_h : 4.35974e-18 m^2 kg s^(-2) +alpha : 7.2973525376000e-03 (rel. unc. = 6.9e-10) dimensionless +R_infinity : 1.0973731568527e+07 (rel. unc. = 6.7e-12) m^(-1) +a_0 : 5.2917720859000e-11 (rel. unc. = 6.8e-10) m +E_h : 4.3597439400000e-18 (rel. unc. = 5.0e-08) m^2 kg s^(-2) electron: -m_e : 9.10938e-31 kg -m_e/m_mu : 0.00483633 dimensionless -m_e/m_tau : 0.000287564 dimensionless -m_e/m_p : 0.000544617 dimensionless -m_e/m_n : 0.000543867 dimensionless -m_e/m_d : 0.000272444 dimensionless -m_e/m_alpha : 0.000137093 dimensionless -e/m_e : 1.75882e+11 kg^(-1) s A -M_e : 5.4858e-07 kg mol^(-1) -lambda_C : 2.42631e-12 m -r_e : 2.81794e-15 m -sigma_e : 6.65246e-29 m^2 -mu_e : -9.28476e-24 m^2 A -a_e : 0.00115965 dimensionless -g_e : -2.00232 dimensionless -mu_e/mu_mu : 206.767 dimensionless -mu_e/mu_p : -658.211 dimensionless -mu_e/mu_pp : -658.228 dimensionless -mu_e/mu_n : 960.92 dimensionless -mu_e/mu_d : -2143.92 dimensionless -mu_e/mu_hp : 864.058 dimensionless -gamma_e : 1.76086 kg^(-1) s A +m_e : 9.1093821500000e-31 (rel. unc. = 4.9e-08) kg +m_e/m_mu : 4.8363317100000e-03 (rel. unc. = 2.5e-08) dimensionless +m_e/m_tau : 2.8756400000000e-04 (rel. unc. = 1.6e-04) dimensionless +m_e/m_p : 5.4461702177000e-04 (rel. unc. = 4.4e-10) dimensionless +m_e/m_n : 5.4386734459000e-04 (rel. unc. = 6.1e-10) dimensionless +m_e/m_d : 2.7244371093000e-04 (rel. unc. = 4.4e-10) dimensionless +m_e/m_alpha : 1.3709335557000e-04 (rel. unc. = 4.2e-10) dimensionless +e/m_e : 1.7588201500000e+11 (rel. unc. = 2.5e-08) kg^(-1) s A +M_e : 5.4857990943000e-07 (rel. unc. = 4.2e-10) kg mol^(-1) +lambda_C : 2.4263102175000e-12 (rel. unc. = 1.4e-09) m +r_e : 2.8179402894000e-15 (rel. unc. = 2.1e-09) m +sigma_e : 6.6524585580000e-29 (rel. unc. = 4.1e-09) m^2 +mu_e : -9.2847637700000e-24 (rel. unc. = 2.5e-08) m^2 A +a_e : 1.1596521811100e-03 (rel. unc. = 6.4e-10) dimensionless +g_e : -2.0023193043622e+00 (rel. unc. = 7.5e-13) dimensionless +mu_e/mu_mu : 2.0676698770000e+02 (rel. unc. = 2.5e-08) dimensionless +mu_e/mu_p : -6.5821068480000e+02 (rel. unc. = 8.2e-09) dimensionless +mu_e/mu_pp : -6.5822759710000e+02 (rel. unc. = 1.1e-08) dimensionless +mu_e/mu_n : 9.6092050000000e+02 (rel. unc. = 2.4e-07) dimensionless +mu_e/mu_d : -2.1439234980000e+03 (rel. unc. = 8.4e-09) dimensionless +mu_e/mu_hp : 8.6405825700000e+02 (rel. unc. = 1.2e-08) dimensionless +gamma_e : 1.7608597700000e+11 (rel. unc. = 2.5e-08) kg^(-1) s A muon: -m_mu : 1.88353e-28 kg -m_mu/m_e : 206.768 dimensionless -m_mu/m_tau : 0.0594592 dimensionless -m_mu/m_p : 0.11261 dimensionless -m_mu/m_n : 0.112455 dimensionless -M_mu : 0.000113429 kg mol^(-1) -lambda_C_mu : 1.17344e-14 m -mu_m : -4.49045e-26 m^2 A -a_mu : 0.00116592 dimensionless -g_mu : -2.00233 dimensionless -mu_mu/mu_p : -3.18335 dimensionless +m_mu : 1.8835313000000e-28 (rel. unc. = 5.8e-08) kg +m_mu/m_e : 2.0676828230000e+02 (rel. unc. = 2.5e-08) dimensionless +m_mu/m_tau : 5.9459200000000e-02 (rel. unc. = 1.6e-04) dimensionless +m_mu/m_p : 1.1260952610000e-01 (rel. unc. = 2.6e-08) dimensionless +m_mu/m_n : 1.1245451670000e-01 (rel. unc. = 2.6e-08) dimensionless +M_mu : 1.1342892560000e-04 (rel. unc. = 2.6e-08) kg mol^(-1) +lambda_C_mu : 1.1734441040000e-14 (rel. unc. = 2.6e-08) m +mu_mu : -4.4904478600000e-26 (rel. unc. = 3.6e-08) m^2 A +a_mu : 1.1659206900000e-03 (rel. unc. = 5.1e-07) dimensionless +g_mu : -2.0023318414000e+00 (rel. unc. = 6.0e-10) dimensionless +mu_mu/mu_p : -3.1833451370000e+00 (rel. unc. = 2.7e-08) dimensionless tau: -m_tau : 3.16777e-27 kg -m_tau/m_e : 3477.48 dimensionless -m_tau/m_mu : 16.8183 dimensionless -m_tau/m_p : 1.8939 dimensionless -m_tau/m_n : 1.89129 dimensionless -M_tau : 0.0019077 kg mol^(-1) -lambda_C_tau: 6.9772e-16 m +m_tau : 3.1677700000000e-27 (rel. unc. = 1.6e-04) kg +m_tau/m_e : 3.4774800000000e+03 (rel. unc. = 1.6e-04) dimensionless +m_tau/m_mu : 1.6818300000000e+01 (rel. unc. = 1.6e-04) dimensionless +m_tau/m_p : 1.8939000000000e+00 (rel. unc. = 1.6e-04) dimensionless +m_tau/m_n : 1.8912900000000e+00 (rel. unc. = 1.6e-04) dimensionless +M_tau : 1.9076800000000e-03 (rel. unc. = 1.6e-04) kg mol^(-1) +lambda_C_tau: 6.9772000000000e-16 (rel. unc. = 1.6e-04) m proton: -m_p : 1.67262e-27 kg -m_p/m_e : 1836.15 dimensionless -m_p/m_mu : 8.88024 dimensionless -m_p/m_tau : 0.528012 dimensionless -m_p/m_n : 0.998623 dimensionless -e/m_p : 9.57883e+07 kg^(-1) s A -M_p : 0.00100728 kg mol^(-1) -R_p : 8.75e-16 m -mu_p : 1.41061e-26 m^2 A -g_p : 5.58569 dimensionless -mu_p/mu_n : -1.4599 dimensionless -mu_pp : 1.41057e-26 m^2 A -gamma_p : 2.67522e+08 kg^(-1) s A -gamma_pp : 2.67515e+08 kg^(-1) s A +m_p : 1.6726216370000e-27 (rel. unc. = 5.0e-08) kg +m_p/m_e : 1.8361526724700e+03 (rel. unc. = 4.4e-10) dimensionless +m_p/m_mu : 8.8802433900000e+00 (rel. unc. = 2.6e-08) dimensionless +m_p/m_tau : 5.2801200000000e-01 (rel. unc. = 1.6e-04) dimensionless +m_p/m_n : 9.9862347824000e-01 (rel. unc. = 4.6e-10) dimensionless +e/m_p : 9.5788339200000e+07 (rel. unc. = 2.5e-08) kg^(-1) s A +M_p : 1.0072764667700e-03 (rel. unc. = 9.9e-11) kg mol^(-1) +R_p : 8.7680000000000e-16 (rel. unc. = 7.9e-03) m +mu_p : 1.4106066620000e-26 (rel. unc. = 2.6e-08) m^2 A +g_p : 5.5856947130000e+00 (rel. unc. = 8.2e-09) dimensionless +mu_p/mu_n : -1.4598980600000e+00 (rel. unc. = 2.3e-07) dimensionless +mu_pp : 1.4105704190000e-26 (rel. unc. = 2.7e-08) m^2 A +gamma_p : 2.6752220990000e+08 (rel. unc. = 2.6e-08) kg^(-1) s A +gamma_pp : 2.6751533620000e+08 (rel. unc. = 2.7e-08) kg^(-1) s A neutron: -m_n : 1.67493e-27 kg -m_n/m_e : 1838.68 dimensionless -m_n/m_mu : 8.89248 dimensionless -m_n/m_tau : 0.52874 dimensionless -m_n/m_p : 1.00138 dimensionless -lambda_C_n : 1.31959e-15 m -M_n : 0.00100866 kg mol^(-1) -mu_n : -9.66236e-27 m^2 A -g_n : -3.82609 dimensionless -mu_n/mu_p : -0.684979 dimensionless -mu_n/mu_pp : -0.684997 dimensionless -gamma_n : 1.83247e+08 kg^(-1) s A +m_n : 1.6749272110000e-27 (rel. unc. = 5.0e-08) kg +m_n/m_e : 1.8386836605000e+03 (rel. unc. = 6.0e-10) dimensionless +m_n/m_mu : 8.8924840900000e+00 (rel. unc. = 2.6e-08) dimensionless +m_n/m_tau : 5.2874000000000e-01 (rel. unc. = 1.6e-04) dimensionless +m_n/m_p : 1.0013784191800e+00 (rel. unc. = 4.6e-10) dimensionless +lambda_C_n : 1.3195908951000e-15 (rel. unc. = 1.5e-09) m +M_n : 1.0086649159700e-03 (rel. unc. = 4.3e-10) kg mol^(-1) +mu_n : -9.6623641000000e-27 (rel. unc. = 2.4e-07) m^2 A +g_n : -3.8260854500000e+00 (rel. unc. = 2.4e-07) dimensionless +mu_n/mu_p : -6.8497934000000e-01 (rel. unc. = 2.3e-07) dimensionless +mu_n/mu_pp : -6.8499694000000e-01 (rel. unc. = 2.3e-07) dimensionless +gamma_n : 1.8324718500000e+08 (rel. unc. = 2.3e-07) kg^(-1) s A deuteron: -m_d : 3.34358e-27 kg -m_d/m_e : 3670.48 dimensionless -m_d/m_p : 1.99901 dimensionless -M_d : 0.00201355 kg mol^(-1) -R_d : 2.1394e-15 m -mu_d : 4.33071e-27 m^2 A -g_n : -3.82609 dimensionless -mu_d/mu_e : -0.000466435 dimensionless -mu_d/mu_p : 0.307012 dimensionless -mu_d/mu_n : -0.448207 dimensionless +m_d : 3.3435832000000e-27 (rel. unc. = 5.1e-08) kg +m_d/m_e : 3.6704829654000e+03 (rel. unc. = 4.4e-10) dimensionless +m_d/m_p : 1.9990075010800e+00 (rel. unc. = 1.1e-10) dimensionless +M_d : 2.0135532127240e-03 (rel. unc. = 3.9e-11) kg mol^(-1) +R_d : 2.1402000000000e-15 (rel. unc. = 1.3e-03) m +mu_d : 4.3307346500000e-27 (rel. unc. = 2.5e-08) m^2 A +mu_d/mu_e : -4.6643455370000e-04 (rel. unc. = 8.4e-09) dimensionless +mu_d/mu_p : 3.0701220700000e-01 (rel. unc. = 7.8e-09) dimensionless +mu_d/mu_n : -4.4820652000000e-01 (rel. unc. = 2.5e-07) dimensionless helion: -m_h : 5.00641e-27 kg +m_h : 5.0064119200000e-27 (rel. unc. = 5.0e-08) kg alpha particle: -m_alpha : 6.64466e-27 kg +m_alpha : 6.6446562000000e-27 (rel. unc. = 5.0e-08) kg //] @endverbatim @@ -302,7 +301,6 @@ << "M_d :\t" << M_d << std::endl << "R_d :\t" << R_d << std::endl << "mu_d :\t" << mu_d << std::endl - << "g_n :\t" << g_n << std::endl << "mu_d/mu_e :\t" << mu_d_over_mu_e << std::endl << "mu_d/mu_p :\t" << mu_d_over_mu_p << std::endl << "mu_d/mu_n :\t" << mu_d_over_mu_n << std::endl |