Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76070 - in sandbox/math_constants: boost/math/constants libs/math/doc libs/math/test
From: pbristow_at_[hidden]
Date: 2011-12-19 14:21:17


Author: pbristow
Date: 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
New Revision: 76070
URL: http://svn.boost.org/trac/boost/changeset/76070

Log:
Yet more update to docs and correction to constants and new long double tests for all constants.
Text files modified:
   sandbox/math_constants/boost/math/constants/calculate_constants.hpp | 33 +++++++-
   sandbox/math_constants/boost/math/constants/constants.hpp | 132 ++++++++++++++++-----------------
   sandbox/math_constants/libs/math/doc/constants.qbk | 66 ++++++++++++----
   sandbox/math_constants/libs/math/test/Jamfile.v2 | 2
   sandbox/math_constants/libs/math/test/test_constant_generate.cpp | 156 +++++++++++++++++++++------------------
   sandbox/math_constants/libs/math/test/test_constants.cpp | 108 +++++++++++++++++++++++++--
   sandbox/math_constants/libs/math/test/test_print_info_on_type.cpp | 55 ++++++++++++++
   7 files changed, 379 insertions(+), 173 deletions(-)

Modified: sandbox/math_constants/boost/math/constants/calculate_constants.hpp
==============================================================================
--- sandbox/math_constants/boost/math/constants/calculate_constants.hpp (original)
+++ sandbox/math_constants/boost/math/constants/calculate_constants.hpp 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -166,6 +166,25 @@
 
 template <class T>
 template<int N>
+inline T constant_euler_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return euler<T, policies::policy<policies::digits2<N> > >()
+ * euler<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1)
+ / euler<T, policies::policy<policies::digits2<N> > >();
+}
+
+
+template <class T>
+template<int N>
 inline T constant_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
 {
    BOOST_MATH_STD_USING
@@ -395,7 +414,7 @@
 inline T constant_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
 {
    BOOST_MATH_STD_USING
- return pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(-3));
+ return pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
 }
 
 template <class T>
@@ -404,7 +423,7 @@
 {
    BOOST_MATH_STD_USING
    return static_cast<T>(1)
- / pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(-3));
+ / pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
 }
 
 // Euler's e
@@ -506,7 +525,7 @@
 
 template <class T>
 template<int N>
-inline T constant_log_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+inline T constant_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
 {
    BOOST_MATH_STD_USING
    //return log(phi<T, policies::policy<policies::digits2<N> > >()); // ???
@@ -514,13 +533,15 @@
 }
 template <class T>
 template<int N>
-inline T constant_one_div_log_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+inline T constant_one_div_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
 {
    BOOST_MATH_STD_USING
    return static_cast<T>(1) /
      log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
 }
 
+/*
+Gamma now deprecated, so now see euler above
 // Euler-Mascheroni's Gamma Constant
 
 //http://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant
@@ -565,6 +586,8 @@
      / gamma<T, policies::policy<policies::digits2<N> > >();
 }
 
+
+
 template <class T>
 template<int N>
 inline T constant_gamma_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
@@ -574,7 +597,7 @@
      return gamma<T, policies::policy<policies::digits2<N> > >()
      * gamma<T, policies::policy<policies::digits2<N> > >();
 }
-
+*/
 // Zeta
 
 template <class T>

Modified: sandbox/math_constants/boost/math/constants/constants.hpp
==============================================================================
--- sandbox/math_constants/boost/math/constants/constants.hpp (original)
+++ sandbox/math_constants/boost/math/constants/constants.hpp 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -1,5 +1,5 @@
-// Copyright John Maddock 2005-2006.
-// Copyright Paul A. Bristow 2006-2010.
+// Copyright John Maddock 2005-2006, 2011.
+// Copyright Paul A. Bristow 2006-2011.
 // Use, modification and distribution are subject to 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)
@@ -208,71 +208,69 @@
    namespace long_double_constants{ static const long double name = BOOST_JOIN(x, L); }\
    namespace constants{
 
- BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01");
- BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01");
- BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01");
- BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01");
- BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000e-01, "7.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01");
- BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078e+00, "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00");
- BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366e+00, "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00");
- BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01");
- BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680e-01, "6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01");
- BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694e-01, "-3.66512920581664327012439158232669469454263447837105263053677713670561615319352738549455822856698908358302523045e-01");
- BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637e+00, "1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081106747157858e+00");
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01");
- BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00");
- BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00");
- BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628e+00, "1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00");
- BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140e-01, "5.23598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752e-01");
- BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768e+00, "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00");
- BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256e+00, "2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101e+00");
- BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163e+00, "2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488e+00");
- BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512e+00, "4.18879020478639098461685784437267051226289253250014109463325945641042187504827866483737976712282275730953078202e+00");
- BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620e-01, "1.59154943091895335768883763372514362034459645740456448747667344058896797634226535090113802766253085956072842727e-01");
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684e-01, "3.98942280401432677939946059934381868475858631164934657665925829670657925899301838501252333907306936430302558863e-01");
- BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182e+00, "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362e+00");
- BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.25331413731550025120788264240552262650349337030496915831496178817114682730392098747329791918902863305800498633e+00");
- BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00");
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01");
- BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01");
- BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841e-01, "1.41592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513e-01");
- BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158e-01, "8.58407346410206761537356616720497115802830600624894179025055407692183593713791001371965174657882932017851913487e-01");
- BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807e-01, "7.95316767371597544348395335056806580727639173327713205445302234388856268267518187590758006888600828436839800178e-01");
- BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502e+01, "2.24591577183610454734271522045437350275893151339966922492030025540669260403991179123185197527271430315314500731e+01");
- BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135e+00, "9.86960440108935861883449099987615113531369940724079062641334937622004482241920524300177340371855223182402591377e+00");
- BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00");
- BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01");
- BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 3.225153443319948918442205268856368859e-02, "3.22515344331994891844220526885636885930633361474780767345817222155840617944954895382254148095655200372649757346e-02");
- BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01");
- BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497e+00, "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193e+00");
- BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01");
- BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534e-01, "6.06530659712633423603799534991180453441918135487186955682892158735056519413748423998647611507989456026423789794e-01");
- BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738e+01, "2.31406926327792690057290863679485473802661062426002119934450464095243423506904527835169719970675492196759527048e+01");
- BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571e+00, "1.64872127070012814684865078781416357165377610071014801157507931164066102119421560863277652005636664300286663776e+00");
- BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822e-01, "4.34294481903251827651128918916605082294397005803666566114453783165864649208870774729224949338431748318706106745e-01");
- BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00");
- BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713e-02, "1.74532925199432957692369076848861271344287188854172545609719144017100911460344944368224156963450948221230449251e-02");
- BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033e+01, "5.72957795130823208767981548141051703324054724665643215491602438612028471483215526324409689958511109441862233816e+01");
- BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996e-01, "8.41470984807896506652502321630298999622563060798371065672751709991910404391239668948639743543052695854349037908e-01");
- BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037e-01, "5.40302305868139717400936607442976603732310420617922227670097255381100394774471764517951856087183089343571731160e-01");
- BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815e+00, "1.17520119364380145688238185059560081515571798133409587022956541301330756730432389560711745208962339184041953333e+00");
- BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682e+00, "1.54308063481524377847790562075706168260152911236586370473740221471076906304922369896426472643554303558704685860e+00");
- BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117e+00, "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408808e+00");
- BOOST_DEFINE_MATH_CONSTANT(log_phi, 4.812118250596034474977589134243684231e-01, "4.81211825059603447497758913424368423135184334385660519661018168840163867608221774412009429122723474997231839958e-01");
- BOOST_DEFINE_MATH_CONSTANT(one_div_log_phi, 2.078086921235027537601322606117795767e+00, "2.07808692123502753760132260611779576774219226778328348027813992191974386928553540901445615414453604821933918634e+00");
- BOOST_DEFINE_MATH_CONSTANT(gamma, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01");
- BOOST_DEFINE_MATH_CONSTANT(one_div_gamma, 1.732454714600633473583025315860829681e+00, "1.73245471460063347358302531586082968115577655226680502204843613287065531408655243008832840219409928068072365714e+00");
- BOOST_DEFINE_MATH_CONSTANT(gamma_sqr, 3.331779238077186743183761363552442266e-01, "3.33177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603e-01");
- BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00");
- BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990e+00, "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915780e+00");
- BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107e-01, "9.15965594177219015054603514932384110774149374281672134266498119621763019776254769479356512926115106248574422619e-01");
- BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693e+00, "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346591e+00");
- BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727e+00, "1.28242712910062263687534256886979172776768892732500119206374002174040630885882646112973649195820237439420646120e+00");
- BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112e+00, "1.13954709940464865749279301938984611208759979583655182472165571008524800770607068570718754688693851501894272049e+00");
- BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01");
- BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415e+00, "3.24508930068763806284866041061975441541706673178920936177133764493367904540874159051490619368679348977426462633e+00");
- BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154e-01, "2.45089300687638062848660410619754415417066731789209361771337644933679045408741590514906193686793489774264626328e-01");
-
+ BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01");
+ BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01");
+ BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01");
+ BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01");
+ BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000e-01, "7.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078e+00, "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00");
+ BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366e+00, "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00");
+ BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01");
+ BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680e-01, "6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01");
+ BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694e-01, "-3.66512920581664327012439158232669469454263447837105263053677713670561615319352738549455822856698908358302523045e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637e+00, "1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081106747157858e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00");
+ BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00");
+ BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628e+00, "1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00");
+ BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140e-01, "5.23598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752e-01");
+ BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768e+00, "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00");
+ BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256e+00, "2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101e+00");
+ BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163e+00, "2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488e+00");
+ BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512e+00, "4.18879020478639098461685784437267051226289253250014109463325945641042187504827866483737976712282275730953078202e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620e-01, "1.59154943091895335768883763372514362034459645740456448747667344058896797634226535090113802766253085956072842727e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684e-01, "3.98942280401432677939946059934381868475858631164934657665925829670657925899301838501252333907306936430302558863e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182e+00, "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362e+00");
+ BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.25331413731550025120788264240552262650349337030496915831496178817114682730392098747329791918902863305800498633e+00");
+ BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841e-01, "1.41592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513e-01");
+ BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158e-01, "8.58407346410206761537356616720497115802830600624894179025055407692183593713791001371965174657882932017851913487e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807e-01, "7.95316767371597544348395335056806580727639173327713205445302234388856268267518187590758006888600828436839800178e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502e+01, "2.24591577183610454734271522045437350275893151339966922492030025540669260403991179123185197527271430315314500731e+01");
+ BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135e+00, "9.86960440108935861883449099987615113531369940724079062641334937622004482241920524300177340371855223182402591377e+00");
+ BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00");
+ BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01");
+ BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 1.464591887561523263020142527263790391e+00, "1.46459188756152326302014252726379039173859685562793717435725593713839364979828626614568206782035382089750397002e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 6.827840632552956814670208331581645981e-01, "6.82784063255295681467020833158164598108367515632448804042681583118899226433403918237673501922595519865685577274e-01");
+ BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497e+00, "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193e+00");
+ BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534e-01, "6.06530659712633423603799534991180453441918135487186955682892158735056519413748423998647611507989456026423789794e-01");
+ BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738e+01, "2.31406926327792690057290863679485473802661062426002119934450464095243423506904527835169719970675492196759527048e+01");
+ BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571e+00, "1.64872127070012814684865078781416357165377610071014801157507931164066102119421560863277652005636664300286663776e+00");
+ BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822e-01, "4.34294481903251827651128918916605082294397005803666566114453783165864649208870774729224949338431748318706106745e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00");
+ BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713e-02, "1.74532925199432957692369076848861271344287188854172545609719144017100911460344944368224156963450948221230449251e-02");
+ BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033e+01, "5.72957795130823208767981548141051703324054724665643215491602438612028471483215526324409689958511109441862233816e+01");
+ BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996e-01, "8.41470984807896506652502321630298999622563060798371065672751709991910404391239668948639743543052695854349037908e-01");
+ BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037e-01, "5.40302305868139717400936607442976603732310420617922227670097255381100394774471764517951856087183089343571731160e-01");
+ BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815e+00, "1.17520119364380145688238185059560081515571798133409587022956541301330756730432389560711745208962339184041953333e+00");
+ BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682e+00, "1.54308063481524377847790562075706168260152911236586370473740221471076906304922369896426472643554303558704685860e+00");
+ BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117e+00, "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408808e+00");
+ BOOST_DEFINE_MATH_CONSTANT(ln_phi, 4.812118250596034474977589134243684231e-01, "4.81211825059603447497758913424368423135184334385660519661018168840163867608221774412009429122723474997231839958e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_ln_phi, 2.078086921235027537601322606117795767e+00, "2.07808692123502753760132260611779576774219226778328348027813992191974386928553540901445615414453604821933918634e+00");
+ BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_euler, 1.732454714600633473583025315860829681e+00, "1.73245471460063347358302531586082968115577655226680502204843613287065531408655243008832840219409928068072365714e+00");
+ BOOST_DEFINE_MATH_CONSTANT(euler_sqr, 3.331779238077186743183761363552442266e-01, "3.33177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603e-01");
+ BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00");
+ BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990e+00, "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915780e+00");
+ BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107e-01, "9.15965594177219015054603514932384110774149374281672134266498119621763019776254769479356512926115106248574422619e-01");
+ BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693e+00, "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346591e+00");
+ BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727e+00, "1.28242712910062263687534256886979172776768892732500119206374002174040630885882646112973649195820237439420646120e+00");
+ BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112e+00, "1.13954709940464865749279301938984611208759979583655182472165571008524800770607068570718754688693851501894272049e+00");
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01");
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415e+00, "3.24508930068763806284866041061975441541706673178920936177133764493367904540874159051490619368679348977426462633e+00");
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154e-01, "2.45089300687638062848660410619754415417066731789209361771337644933679045408741590514906193686793489774264626328e-01");
 } // namespace constants
 } // namespace math
 } // namespace boost

Modified: sandbox/math_constants/libs/math/doc/constants.qbk
==============================================================================
--- sandbox/math_constants/libs/math/doc/constants.qbk (original)
+++ sandbox/math_constants/libs/math/doc/constants.qbk 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -316,7 +316,6 @@
 [[three_quarters_pi] [3/4 [pi]] [2.35619] [[@http://en.wikipedia.org/wiki/Sphere#Volume_of_a_sphere volume of a hemi-sphere] = 4/3 [pi] r[cubed]]]
 [[four_thirds_pi] [4/3 [pi]] [4.18879] [[@http://en.wikipedia.org/wiki/Sphere#Volume_of_a_sphere volume of a sphere] = 4/3 [pi] r[cubed]]]
 [[one_div_two_pi] [1/(2[pi])] [1.59155] [Widely used]]
-[[one_div_root_two_pi] [1/([radic]2 [pi])] [0.398942] [] ]
 [[root_pi] [[radic][pi]][1.77245] [Widely used]]
 [[root_half_pi] [[radic] [pi]/2] [1.25331] [Widely used]]
 [[root_two_pi][[radic] [pi]*2] [2.50662] [Widely used]]
@@ -352,8 +351,8 @@
 
 [[[*Phi]] [ Phidias golden ratio] [[@http://en.wikipedia.org/wiki/Golden_ratio Phidias golden ratio]] [] ]
 [[phi] [(1 + [radic]5) /2] [1.61803] [finance] ]
-[[log_phi] [ln([phi])] [0.48121] [] ]
-[[one_div_log_phi] [1/ln([phi])] [2.07808] [] ]
+[[ln_phi] [ln([phi])] [0.48121] [] ]
+[[one_div_ln_phi] [1/ln([phi])] [2.07808] [] ]
 
 [[[*Euler's Gamma]] [] [] [] ]
 [[euler] [euler] [0.577215] [[@http://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant Euler-Mascheroni gamma constant]] ]
@@ -361,11 +360,13 @@
 [[euler_sqr] [euler[super 2]] [0.333177] [] ]
 
 [[[*Misc]] [] [] [] ]
-
 [[zeta_two] [[zeta](2)] [1.64493] [[@http://en.wikipedia.org/wiki/Riemann_zeta_function Riemann zeta function]] ]
 [[zeta_three] [[zeta](3)] [1.20205] [[@http://en.wikipedia.org/wiki/Riemann_zeta_function Riemann zeta function]] ]
 [[catalan] [['K]] [0.915965] [[@http://mathworld.wolfram.com/CatalansConstant.html Catalan (or Glaisher) combinatorial constant] ]]
-[[extreme_skewness] [12[radic]6 [zeta](3)/ [pi][super 3]] [1.139547] [Extreme value distribution] ]
+[[glaisher] [['A]] [1.28242] [[@https://oeis.org/A074962/constant Decimal expansion of Glaisher-Kinkelin constant] ]]
+[[khinchin] [['k]] [2.685452] [[@https://oeis.org/A002210/constant Decimal expansion of Khinchin constant] ]]
+
+[[extreme_value_skewness] [12[radic]6 [zeta](3)/ [pi][super 3]] [1.139547] [Extreme value distribution] ]
 [[rayleigh_skewness] [2[radic][pi]([pi]-3)/(4 - [pi])[super 3/2]] [0.631110] [Rayleigh distribution skewness] ]
 [[rayleigh_kurtosis_excess] [-(6[pi][super 2]-24[pi]+16)/(4-[pi])[super 2]] [0.245089] [[@http://en.wikipedia.org/wiki/Rayleigh_distribution Rayleigh distribution kurtosis excess]] ]
 [[rayleigh_kurtosis] [3+(6[pi][super 2]-24[pi]+16)/(4-[pi])[super 2]] [3.245089] [Rayleigh distribution kurtosis] ]
@@ -460,10 +461,10 @@
   BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00");
 ]
 
-This macro BOOST_DEFINE_MATH_CONSTANT inserts a code snippet that
+This macro BOOST_DEFINE_MATH_CONSTANT inserts a C++ struct code snippet that
 declares the `float`, `double` and `long double` versions of the constant,
 plus a decimal digit string representation correct to 100 decimal
-digits, and all the meta-programming machinary needed to select between them.
+digits, and all the meta-programming machinery needed to select between them.
 
 The result of an expanded macro for Pi is shown below.
 
@@ -495,7 +496,7 @@
 * No CamelCase.
 * Underscore as _ delimiter between words.
 * Numbers spelt as words rather than decimal digits (except following pow).
-* Abbreviation words:
+* Abbreviation conventions:
   * root for square root.
   * cbrt for cube root.
   * pow for pow function using decimal digits like pow23 for n[super 2/3].
@@ -517,7 +518,32 @@
 [h4 How Accurate are the constants?]
 The minimum accuracy chosen (100 decimal digits) exceeds the
 accuracy of reasonably-foreseeable floating-point hardware (256-bit)
-and should meet most high_precision computations.
+and should meet most high-precision computations.
+
+[h4 How are the constants tested?]
+
+# Comparison using Boost.Test BOOST_CHECK_CLOSE_FRACTION using long double literals,
+with at least 35 decimal digits, enough to be accurate for all long double implementations.
+The tolerance is usually twice `long double epsilon`.
+
+# Comparison with calculation at long double precision.
+This often requires a slightly higher tolerance than two epsilon
+because of computational noise from round-off etc,
+especially when trig and other functions are called.
+
+# Comparison with independent published values,
+for example, using [@http://oeis.org/ The On-Line Encyclopedia of Integer Sequences (OEIS)]
+again using at least 35 decimal digits strings.
+
+# Comparison with independely calculated values using arbitrary precision tools like
+[@http://www.wolfram.com/mathematica/ Mathematica], again using at least 35 decimal digits literal strings.
+
+[warning We have not yet been able to [*check] that
+[*all] constants are accurate at the full arbitrary precision,
+at present 100 decimal digits.
+But certain key values like `e` and `pi` appear to be accurate
+and internal consistencies suggest that others are this accurate too.
+]
 
 [h4 Why is Portability important?]
 
@@ -542,16 +568,19 @@
 
 Constants are stored as 100 decimal digit values.
 However, some compilers do not accept decimal digits strings as long as this.
-So the constant is split into two parts, with the 1st containing at least
-long double precision, and the 2nd zero if not needed or known.
-The 3rd part permits an exponent to be provided if necessary (use zero if none) -
-the other two parameters may only contain decimal digits (and sign and decimal point),
-and may NOT include an exponent like 1.234E99.
-The second digit string is only used if T is a User-Defined Type,
-when the constant is converted to a long string literal.
-If `T `is constructible from a `const char*` then it's directly constructed from the string,
+So the constant is split into two parts, with the first containing at least
+128-bit long double precision (35 decimal digits),
+and for consistency should be in scientific format with a signed exponent.
+
+The second part is the value of the constant expressed as a string literal,
+accurate to at least 100 decimal digits (in practice that means at least 102 digits).
+Again for consistency use scientific format with a signed exponent.
+
+For types with precision greater than a long double,
+then if T is constructible `T `is constructible from a `const char*`
+then it's directly constructed from the string,
 otherwise we fall back on lexical_cast to convert to type `T`.
-(This is necessary because you can't use a numeric constant
+(Using a string is necessary because you can't use a numeric constant
 since even a `long double` might not have enough digits).
 
 So, for example, a constant like pi is internally defined as
@@ -655,6 +684,7 @@
 
 # Constants with very high precision and good accuracy (>40 decimal digits)
 from Simon Plouffe's web based collection [@http://pi.lacim.uqam.ca/eng/].
+# [@https://oeis.org/ The On-Line Encyclopedia of Integer Sequences (OEIS)]
 # Checks using printed text optically scanned values and converted from:
 D. E. Knuth, Art of Computer Programming, Appendix A, Table 1, Vol 1, ISBN 0 201 89683 4 (1997)
 # M. Abrahamovitz & I. E. Stegun, National Bureau of Standards, Handbook of Mathematical Functions,

Modified: sandbox/math_constants/libs/math/test/Jamfile.v2
==============================================================================
--- sandbox/math_constants/libs/math/test/Jamfile.v2 (original)
+++ sandbox/math_constants/libs/math/test/Jamfile.v2 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -15,7 +15,7 @@
 import path ;
 
 local ntl-path = [ modules.peek : NTL_PATH ] ;
-local gmp_path = [ modules.peek : GMP_PATH ] ;
+# local gmp_path = [ modules.peek : GMP_PATH ] ;
 
 local boost-path = [ modules.peek : BOOST ] ;
 

Modified: sandbox/math_constants/libs/math/test/test_constant_generate.cpp
==============================================================================
--- sandbox/math_constants/libs/math/test/test_constant_generate.cpp (original)
+++ sandbox/math_constants/libs/math/test/test_constant_generate.cpp 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -13,6 +13,8 @@
 # pragma warning (disable : 4996) //To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
 #endif
 
+#define USE_CPP_FLOAT
+
 // To add new constants, add a function that calculates the value of the constant to
 // boost/math/constants/calculate_constants.hpp
 
@@ -65,7 +67,6 @@
 
    // Euler's e and related.
    BOOST_CONSTANTS_GENERATE(e);
- BOOST_CONSTANTS_GENERATE(euler);
    BOOST_CONSTANTS_GENERATE(exp_minus_half);
 
    BOOST_CONSTANTS_GENERATE(e_pow_pi);
@@ -83,13 +84,20 @@
 
    // Phi
    BOOST_CONSTANTS_GENERATE(phi);
- BOOST_CONSTANTS_GENERATE(log_phi);
- BOOST_CONSTANTS_GENERATE(one_div_log_phi);
+ BOOST_CONSTANTS_GENERATE(ln_phi);
+ BOOST_CONSTANTS_GENERATE(one_div_ln_phi);
    
 // Euler's Gamma constant http://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant
- BOOST_CONSTANTS_GENERATE(gamma);
- BOOST_CONSTANTS_GENERATE(one_div_gamma);
- BOOST_CONSTANTS_GENERATE(gamma_sqr);
+ // gamma name deprecated - see euler above
+
+ BOOST_CONSTANTS_GENERATE(euler);
+ BOOST_CONSTANTS_GENERATE(one_div_euler);
+ BOOST_CONSTANTS_GENERATE(euler_sqr);
+
+
+ // BOOST_CONSTANTS_GENERATE(gamma);
+ // BOOST_CONSTANTS_GENERATE(one_div_gamma);
+ // BOOST_CONSTANTS_GENERATE(gamma_sqr);
 
 // zeta
    BOOST_CONSTANTS_GENERATE(zeta_two);
@@ -101,7 +109,6 @@
    BOOST_CONSTANTS_GENERATE(rayleigh_skewness);
    BOOST_CONSTANTS_GENERATE(rayleigh_kurtosis);
    BOOST_CONSTANTS_GENERATE(rayleigh_kurtosis_excess);
-
    
    return 0;
 }
@@ -135,73 +142,74 @@
   BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684, 7585863116493465766592582967065792589930183850125233390730693643030255886, -1);
 ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
-1> BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000, 00000000000000000000000000000000000000000000000000000000000000000000000000, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333, 33333333333333333333333333333333333333333333333333333333333333333333333333, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666, 66666666666666666666666666666666666666666666666666666666666666666666666667, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666, 66666666666666666666666666666666666666666666666666666666666666666666666667, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000, 00000000000000000000000000000000000000000000000000000000000000000000000000, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078, 56967187537694807317667973799073247846210703885038753432764157273501384623, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366, 94280525381038062805580697945193301690880003708114618675724857567562614142, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392, 84835937688474036588339868995366239231053519425193767163820786367506923115, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680, 75500134360255254120680009493393621969694715605863326996418687542001481021, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694, 54263447837105263053677713670561615319352738549455822856698908358302523045, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637, 74738568938582053852252575650002658854698492680841813836877081106747157858, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392, 84835937688474036588339868995366239231053519425193767163820786367506923115, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884, 19716939937510582097494459230781640628620899862803482534211706798214808651, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442, 09858469968755291048747229615390820314310449931401741267105853399107404326, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628, 06572313312503527365831486410260546876206966620934494178070568932738269550, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140, 32861566562517636829157432051302734381034833104672470890352844663691347752, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768, 39433879875021164194988918461563281257241799725606965068423413596429617303, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256, 13144626625007054731662972820521093752413933241868988356141137865476539101, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163, 14787704953132936573120844423086230471465674897102611900658780098661106488, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512, 26289253250014109463325945641042187504827866483737976712282275730953078202, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620, 34459645740456448747667344058896797634226535090113802766253085956072842727, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684, 75858631164934657665925829670657925899301838501252333907306936430302558863, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182, 79754945612238712821380778985291128459103218137495065673854466541622682362, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626, 50349337030496915831496178817114682730392098747329791918902863305800498633, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253, 00698674060993831662992357634229365460784197494659583837805726611600997267, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858, 44050629328998856844085721710642468441493414486743660202107363443028347906, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858, 44050629328998856844085721710642468441493414486743660202107363443028347906, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841, 97169399375105820974944592307816406286208998628034825342117067982148086513, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158, 02830600624894179025055407692183593713791001371965174657882932017851913487, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807, 27639173327713205445302234388856268267518187590758006888600828436839800178, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502, 75893151339966922492030025540669260403991179123185197527271430315314500731, +01);
-1> BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135, 31369940724079062641334937622004482241920524300177340371855223182402591377, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189, 21894990120679843773555822937000747040320087383362890061975870530400431896, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520, 22252885658851076941445381038063949174657060375667010326028861930301219616, +01);
-1> BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 3.225153443319948918442205268856368859, 30633361474780767345817222155840617944954895382254148095655200372649757346, -02);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 3.100627668029982017547631506710139520, 22252885658851076941445381038063949174657060375667010326028861930301219616, +01);
-1> BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497, 75724709369995957496696762772407663035354759457138217852516642742746639193, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310, 42159335939923598805767234884867726777664670936947063291746749514631447250, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534, 41918135487186955682892158735056519413748423998647611507989456026423789794, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738, 02661062426002119934450464095243423506904527835169719970675492196759527048, +01);
-1> BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571, 65377610071014801157507931164066102119421560863277652005636664300286663776, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822, 94397005803666566114453783165864649208870774729224949338431748318706106745, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207, 60110148862877297603332790096757260967735248023599720508959829834196778404, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713, 44287188854172545609719144017100911460344944368224156963450948221230449251, -02);
-1> BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033, 24054724665643215491602438612028471483215526324409689958511109441862233816, +01);
-1> BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996, 22563060798371065672751709991910404391239668948639743543052695854349037908, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037, 32310420617922227670097255381100394774471764517951856087183089343571731160, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815, 15571798133409587022956541301330756730432389560711745208962339184041953333, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682, 60152911236586370473740221471076906304922369896426472643554303558704685860, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117, 72030917980576286213544862270526046281890244970720720418939113748475408808, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(log_phi, 4.812118250596034474977589134243684231, 35184334385660519661018168840163867608221774412009429122723474997231839958, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_log_phi, 2.078086921235027537601322606117795767, 74219226778328348027813992191974386928553540901445615414453604821933918634, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(gamma, 5.772156649015328606065120900824024310, 42159335939923598805767234884867726777664670936947063291746749514631447250, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(one_div_gamma, 1.732454714600633473583025315860829681, 15577655226680502204843613287065531408655243008832840219409928068072365714, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(gamma_sqr, 3.331779238077186743183761363552442266, 59417140249629743150833338002265793695756669661263268631715977303039565603, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189, 21894990120679843773555822937000747040320087383362890061975870530400431896, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915780, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107, 74149374281672134266498119621763019776254769479356512926115106248574422619, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693, 82038229399446295305115234555721885953715200280114117493184769799515346591, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727, 76768892732500119206374002174040630885882646112973649195820237439420646120, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112, 08759979583655182472165571008524800770607068570718754688693851501894272049, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798, 44042203134719497658094585692926819617473725459905027032537306794400047264, -01);
-1> BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415, 41706673178920936177133764493367904540874159051490619368679348977426462633, +00);
-1> BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154, 17066731789209361771337644933679045408741590514906193686793489774264626328, -01);
-
-
-
+------ Rebuild All started: Project: test_constant_generate, Configuration: Debug Win32 ------
+ test_constant_generate.cpp
+ test_constant_generate.vcxproj -> J:\Cpp\math_constants\Debug\test_constant_generate.exe
+ BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01");
+ BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01");
+ BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01");
+ BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01");
+ BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000e-01, "7.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078e+00, "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00");
+ BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366e+00, "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00");
+ BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01");
+ BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680e-01, "6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01");
+ BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694e-01, "-3.66512920581664327012439158232669469454263447837105263053677713670561615319352738549455822856698908358302523045e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637e+00, "1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081106747157858e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00");
+ BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00");
+ BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628e+00, "1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00");
+ BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140e-01, "5.23598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752e-01");
+ BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768e+00, "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00");
+ BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256e+00, "2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101e+00");
+ BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163e+00, "2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488e+00");
+ BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512e+00, "4.18879020478639098461685784437267051226289253250014109463325945641042187504827866483737976712282275730953078202e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620e-01, "1.59154943091895335768883763372514362034459645740456448747667344058896797634226535090113802766253085956072842727e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684e-01, "3.98942280401432677939946059934381868475858631164934657665925829670657925899301838501252333907306936430302558863e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182e+00, "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362e+00");
+ BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.25331413731550025120788264240552262650349337030496915831496178817114682730392098747329791918902863305800498633e+00");
+ BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01");
+ BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841e-01, "1.41592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513e-01");
+ BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158e-01, "8.58407346410206761537356616720497115802830600624894179025055407692183593713791001371965174657882932017851913487e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807e-01, "7.95316767371597544348395335056806580727639173327713205445302234388856268267518187590758006888600828436839800178e-01");
+ BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502e+01, "2.24591577183610454734271522045437350275893151339966922492030025540669260403991179123185197527271430315314500731e+01");
+ BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135e+00, "9.86960440108935861883449099987615113531369940724079062641334937622004482241920524300177340371855223182402591377e+00");
+ BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00");
+ BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01");
+ BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 3.225153443319948918442205268856368859e-02, "3.22515344331994891844220526885636885930633361474780767345817222155840617944954895382254148095655200372649757346e-02");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01");
+ BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497e+00, "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193e+00");
+ BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01");
+ BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534e-01, "6.06530659712633423603799534991180453441918135487186955682892158735056519413748423998647611507989456026423789794e-01");
+ BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738e+01, "2.31406926327792690057290863679485473802661062426002119934450464095243423506904527835169719970675492196759527048e+01");
+ BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571e+00, "1.64872127070012814684865078781416357165377610071014801157507931164066102119421560863277652005636664300286663776e+00");
+ BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822e-01, "4.34294481903251827651128918916605082294397005803666566114453783165864649208870774729224949338431748318706106745e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00");
+ BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713e-02, "1.74532925199432957692369076848861271344287188854172545609719144017100911460344944368224156963450948221230449251e-02");
+ BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033e+01, "5.72957795130823208767981548141051703324054724665643215491602438612028471483215526324409689958511109441862233816e+01");
+ BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996e-01, "8.41470984807896506652502321630298999622563060798371065672751709991910404391239668948639743543052695854349037908e-01");
+ BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037e-01, "5.40302305868139717400936607442976603732310420617922227670097255381100394774471764517951856087183089343571731160e-01");
+ BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815e+00, "1.17520119364380145688238185059560081515571798133409587022956541301330756730432389560711745208962339184041953333e+00");
+ BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682e+00, "1.54308063481524377847790562075706168260152911236586370473740221471076906304922369896426472643554303558704685860e+00");
+ BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117e+00, "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408808e+00");
+ BOOST_DEFINE_MATH_CONSTANT(log_phi, 4.812118250596034474977589134243684231e-01, "4.81211825059603447497758913424368423135184334385660519661018168840163867608221774412009429122723474997231839958e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_log_phi, 2.078086921235027537601322606117795767e+00, "2.07808692123502753760132260611779576774219226778328348027813992191974386928553540901445615414453604821933918634e+00");
+ BOOST_DEFINE_MATH_CONSTANT(gamma, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01");
+ BOOST_DEFINE_MATH_CONSTANT(one_div_gamma, 1.732454714600633473583025315860829681e+00, "1.73245471460063347358302531586082968115577655226680502204843613287065531408655243008832840219409928068072365714e+00");
+ BOOST_DEFINE_MATH_CONSTANT(gamma_sqr, 3.331779238077186743183761363552442266e-01, "3.33177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603e-01");
+ BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00");
+ BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990e+00, "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915780e+00");
+ BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107e-01, "9.15965594177219015054603514932384110774149374281672134266498119621763019776254769479356512926115106248574422619e-01");
+ BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693e+00, "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346591e+00");
+ BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727e+00, "1.28242712910062263687534256886979172776768892732500119206374002174040630885882646112973649195820237439420646120e+00");
+ BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112e+00, "1.13954709940464865749279301938984611208759979583655182472165571008524800770607068570718754688693851501894272049e+00");
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01");
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415e+00, "3.24508930068763806284866041061975441541706673178920936177133764493367904540874159051490619368679348977426462633e+00");
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154e-01, "2.45089300687638062848660410619754415417066731789209361771337644933679045408741590514906193686793489774264626328e-01");
+========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
 
 
 

Modified: sandbox/math_constants/libs/math/test/test_constants.cpp
==============================================================================
--- sandbox/math_constants/libs/math/test/test_constants.cpp (original)
+++ sandbox/math_constants/libs/math/test/test_constants.cpp 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -8,6 +8,15 @@
 
 // test_constants.cpp
 
+// Check values of constants are drawn from an independent source, or calculated.
+// Both must be at long double precision for the most precise compilers floating-point implementation.
+// So all values use static_cast<RealType>() of values at least 40 decimal digits
+// and that have suffix L to ensure floating-point type is long double.
+
+#ifdef _MSC_VER
+# pragma warning(disable : 4127) // conditional expression is constant.
+#endif
+
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/test/test_exec_monitor.hpp> // Boost.Test
 #include <boost/test/floating_point_comparison.hpp>
@@ -204,6 +213,10 @@
    // for example: boost::math::long_double_constants::pi
    // (rather than boost::math::constants::pi<long double>() ).
 
+ // All constants are tested here using at least long double precision
+ // with independent calculated or listed values,
+ // or calculations using long double (sometime a little less accurate).
+
    long double tolerance = boost::math::tools::epsilon<long double>() * 2;
 
    using namespace boost::math::long_double_constants;
@@ -223,14 +236,98 @@
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(1)/3, third, tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(2)/3, twothirds, tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(0.14159265358979323846264338327950288419716939937510L), pi_minus_three, tolerance);
- BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(4. - 3.14159265358979323846264338327950288419716939937510L), four_minus_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(4.L - 3.14159265358979323846264338327950288419716939937510L), four_minus_pi, tolerance);
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((4 - 3.14159265358979323846264338327950288419716939937510L), 1.5L)), pow23_four_minus_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((3.14159265358979323846264338327950288419716939937510L), 2.71828182845904523536028747135266249775724709369995L)), pi_pow_e, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((3.14159265358979323846264338327950288419716939937510L), 0.33333333333333333333333333333333333333333333333333L)), cbrt_pi, tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(exp(-0.5L)), exp_minus_half, tolerance);
-#else
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow(2.71828182845904523536028747135266249775724709369995L, 3.14159265358979323846264338327950288419716939937510L)), e_pow_pi, tolerance);
+
+
+#else // Only double, so no suffix L.
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((4 - 3.14159265358979323846264338327950288419716939937510), 1.5)), pow23_four_minus_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((3.14159265358979323846264338327950288419716939937510), 2.71828182845904523536028747135266249775724709369995)), pi_pow_e, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((3.14159265358979323846264338327950288419716939937510), 0.33333333333333333333333333333333333333333333333333)), cbrt_pi, tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(exp(-0.5)), exp_minus_half, tolerance);
 #endif
+ // Rational fractions.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(0.333333333333333333333333333333333333333L), third, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(0.666666666666666666666666666666666666667L), two_thirds, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(0.75L), three_quarters, tolerance);
+ // Two and related.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(2.L)), root_two, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(3.L)), root_three, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(2.L)/2), half_root_two, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(log(2.L)), ln_two, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(log(log(2.0L))), ln_ln_two, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(log(4.0L))), root_ln_four, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(1/sqrt(2.0L)), one_div_root_two, tolerance);
+
+ // pi.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L), pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L/2), half_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L/3), third_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L/6), sixth_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(2 * 3.14159265358979323846264338327950288419716939937510L), two_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3 * 3.14159265358979323846264338327950288419716939937510L / 4), three_quarters_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(4 * 3.14159265358979323846264338327950288419716939937510L / 3), four_thirds_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(1 / (2 * 3.14159265358979323846264338327950288419716939937510L)), one_div_two_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(3.14159265358979323846264338327950288419716939937510L)), root_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(3.14159265358979323846264338327950288419716939937510L / 2)), root_half_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(2 * 3.14159265358979323846264338327950288419716939937510L)), root_two_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(1 / sqrt(3.14159265358979323846264338327950288419716939937510L)), one_div_root_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(1 / sqrt(2 * 3.14159265358979323846264338327950288419716939937510L)), one_div_root_two_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(sqrt(1. / 3.14159265358979323846264338327950288419716939937510L)), root_one_div_pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L - 3.L), pi_minus_three, tolerance * 2 ); // tolerance * 2 because of cancellation loss.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(4.L - 3.14159265358979323846264338327950288419716939937510L), four_minus_pi, tolerance );
+ // BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((4 - 3.14159265358979323846264338327950288419716939937510L), 1.5L)), pow23_four_minus_pi, tolerance); See above.
+ //
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(pow((3.14159265358979323846264338327950288419716939937510L), 2.71828182845904523536028747135266249775724709369995L)), pi_pow_e, tolerance); // See above.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L * 3.14159265358979323846264338327950288419716939937510L), pi_sqr, tolerance); // See above.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L * 3.14159265358979323846264338327950288419716939937510L/6), pi_sqr_div_six, tolerance); // See above.
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L * 3.14159265358979323846264338327950288419716939937510L * 3.14159265358979323846264338327950288419716939937510L), pi_cubed, tolerance); // See above.
+
+ // BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(3.14159265358979323846264338327950288419716939937510L * 3.14159265358979323846264338327950288419716939937510L), cbrt_pi, tolerance); // See above.
+ BOOST_CHECK_CLOSE_FRACTION(cbrt_pi * cbrt_pi * cbrt_pi, pi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION((static_cast<long double>(1)/cbrt_pi), one_div_cbrt_pi, tolerance);
+
+ // Euler
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(2.71828182845904523536028747135266249775724709369995L), e, tolerance);
+
+ //BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(exp(-0.5L)), exp_minus_half, tolerance); // See above.
+ BOOST_CHECK_CLOSE_FRACTION(pow(e, pi), e_pow_pi, tolerance); // See also above.
+ BOOST_CHECK_CLOSE_FRACTION(sqrt(e), root_e, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(log10(e), log10_e, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<long double>(1)/log10(e), one_div_log10_e, tolerance);
+
+ // Trigonmetric
+ BOOST_CHECK_CLOSE_FRACTION(pi/180, degree, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(180 / pi, radian, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(sin(1.L), sin_one, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(cos(1.L), cos_one, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(sinh(1.L), sinh_one, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(cosh(1.L), cosh_one, tolerance);
+
+ // Phi
+ BOOST_CHECK_CLOSE_FRACTION((1.L + sqrt(5.L)) /2, phi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(log((1.L + sqrt(5.L)) /2), ln_phi, tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(1.L / log((1.L + sqrt(5.L)) /2), one_div_ln_phi, tolerance);
+
+ //Euler's Gamma
+ BOOST_CHECK_CLOSE_FRACTION(0.57721566490153286060651209008240243104215933593992L, euler, tolerance); // (sequence A001620 in OEIS).
+ BOOST_CHECK_CLOSE_FRACTION(1.L/ 0.57721566490153286060651209008240243104215933593992L, one_div_euler, tolerance); // (from sequence A001620 in OEIS).
+ BOOST_CHECK_CLOSE_FRACTION(0.57721566490153286060651209008240243104215933593992L * 0.57721566490153286060651209008240243104215933593992L, euler_sqr, tolerance); // (from sequence A001620 in OEIS).
+
+ // Misc
+ BOOST_CHECK_CLOSE_FRACTION(1.644934066848226436472415166646025189218949901206L, zeta_two, tolerance); // A013661 as a constant (usually base 10) in OEIS.
+ BOOST_CHECK_CLOSE_FRACTION(1.20205690315959428539973816151144999076498629234049888179227L, zeta_three, tolerance); // (sequence A002117 in OEIS)
+ BOOST_CHECK_CLOSE_FRACTION(.91596559417721901505460351493238411077414937428167213L, catalan, tolerance); // A006752 as a constant in OEIS.
+ BOOST_CHECK_CLOSE_FRACTION(1.1395470994046486574927930193898461120875997958365518247216557100852480077060706857071875468869385150L, extreme_value_skewness, tolerance); // Mathematica: N[12 Sqrt[6] Zeta[3]/Pi^3, 1101]
+ BOOST_CHECK_CLOSE_FRACTION(0.6311106578189371381918993515442277798440422031347194976580945856929268196174737254599050270325373067L, rayleigh_skewness, tolerance); // Mathematica: N[2 Sqrt[Pi] (Pi - 3)/((4 - Pi)^(3/2)), 1100]
+ BOOST_CHECK_CLOSE_FRACTION(-(6 * pi_sqr - 24 * pi + 16)/((four_minus_pi) * (four_minus_pi)), rayleigh_kurtosis_excess, tolerance * 20); // Cancellation loss of accuracy.
+ BOOST_CHECK_CLOSE_FRACTION(2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515L, khinchin, tolerance ); // A002210 as a constant https://oeis.org/A002210/constant
+ BOOST_CHECK_CLOSE_FRACTION(1.2824271291006226368753425688697917277676889273250011L, glaisher, tolerance ); // https://oeis.org/A074962/constant
 
 } // template <class RealType>void test_spots(RealType)
 
@@ -311,11 +408,7 @@
 
 Output:
 
-test_constants.cpp
- Generating code
- Finished generating code
- test_constants.vcxproj -> J:\Cpp\math_constants\Release\test_constants.exe
- Running 1 test case...
+Running 1 test case...
   Tolerance for type class boost::math::concepts::real_concept is 4.44089e-016.
   Tolerance for type class boost::math::concepts::real_concept is 4.44089e-016.
   Tolerance for type class boost::math::concepts::real_concept is 4.44089e-016.
@@ -326,6 +419,5 @@
   Tolerance for type class boost::math::concepts::big_real_concept is 1.33227e-014.
   
   *** No errors detected
-
 */
 

Modified: sandbox/math_constants/libs/math/test/test_print_info_on_type.cpp
==============================================================================
--- sandbox/math_constants/libs/math/test/test_print_info_on_type.cpp (original)
+++ sandbox/math_constants/libs/math/test/test_print_info_on_type.cpp 2011-12-19 14:21:16 EST (Mon, 19 Dec 2011)
@@ -21,3 +21,58 @@
    return 0;
 }
 
+/*
+
+------ Rebuild All started: Project: test_print_info_on_type, Configuration: Debug Win32 ------
+ test_print_info_on_type.cpp
+ test_print_info_on_type.vcxproj -> J:\Cpp\math_constants\Debug\test_print_info_on_type.exe
+ Information on the Implementation and Handling of
+ Mathematical Constants for Type float
+
+ Checking for std::numeric_limits<float> specialisation: yes
+ std::numeric_limits<float>::digits reports that the precision is
+ 24 binary digits.
+ boost::math::policies::precision<float, Policy> reports that the compile time precision is
+ 24 binary digits.
+ The constant will be constructed from a float.
+
+ Information on the Implementation and Handling of
+ Mathematical Constants for Type double
+
+ Checking for std::numeric_limits<double> specialisation: yes
+ std::numeric_limits<double>::digits reports that the precision is
+ 53 binary digits.
+ boost::math::policies::precision<double, Policy> reports that the compile time precision is
+ 53 binary digits.
+ The constant will be constructed from a double.
+
+ Information on the Implementation and Handling of
+ Mathematical Constants for Type long double
+
+ Checking for std::numeric_limits<long double> specialisation: yes
+ std::numeric_limits<long double>::digits reports that the precision is
+ 53 binary digits.
+ boost::math::policies::precision<long double, Policy> reports that the compile time precision is
+ 53 binary digits.
+ The constant will be constructed from a double.
+
+ Information on the Implementation and Handling of
+ Mathematical Constants for Type class boost::math::concepts::real_concept
+
+ Checking for std::numeric_limits<class boost::math::concepts::real_concept> specialisation: no
+ boost::math::policies::precision<class boost::math::concepts::real_concept, Policy>
+ reports that there is no compile type precision available.
+ boost::math::tools::digits<class boost::math::concepts::real_concept>()
+ reports that the current runtime precision is
+ 53 binary digits.
+ No compile time precision is available, the construction method
+ will be decided at runtime and results will not be cached
+ - this may lead to poor runtime performance.
+ Current runtime precision indicates that
+ the constant will be constructed from a string on each call.
+
+========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
+
+
+*/
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk