Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77740 - in sandbox/math: boost/math/distributions boost/math/special_functions libs/math/test
From: ben_at_[hidden]
Date: 2012-04-03 01:50:51


Author: bensobotta
Date: 2012-04-03 01:50:50 EDT (Tue, 03 Apr 2012)
New Revision: 77740
URL: http://svn.boost.org/trac/boost/changeset/77740

Log:
Fixed the spot-on tests for the skew normal distribution. Included
dedicated long double versions of some routine for Owen's T function.
Fixed an overflow issue in Owen's T reference routine. Reworked some of
the test for Owen's T and the skew normal distribution.

Text files modified:
   sandbox/math/boost/math/distributions/skew_normal.hpp | 24 ++--
   sandbox/math/boost/math/special_functions/owens_t.hpp | 194 ++++++++++++++++++++++++++++++++++++++-
   sandbox/math/libs/math/test/owens_t_T7.hpp | 2
   sandbox/math/libs/math/test/test_owens_t.cpp | 4
   sandbox/math/libs/math/test/test_skew_normal.cpp | 68 +++++++-------
   5 files changed, 237 insertions(+), 55 deletions(-)

Modified: sandbox/math/boost/math/distributions/skew_normal.hpp
==============================================================================
--- sandbox/math/boost/math/distributions/skew_normal.hpp (original)
+++ sandbox/math/boost/math/distributions/skew_normal.hpp 2012-04-03 01:50:50 EDT (Tue, 03 Apr 2012)
@@ -273,20 +273,24 @@
 
     using namespace boost::math::constants;
 
- const RealType delta = dist.shape() / sqrt(static_cast<RealType>(1)+dist.shape()*dist.shape());
+ //const RealType delta = dist.shape() / sqrt(static_cast<RealType>(1)+dist.shape()*dist.shape());
+
+ //return dist.location() + dist.scale() * delta * root_two_div_pi<RealType>();
 
- return dist.location() + dist.scale() * delta * root_two_div_pi<RealType>();
+ return dist.location() + dist.scale() * dist.shape() / sqrt(pi<RealType>()+pi<RealType>()*dist.shape()*dist.shape()) * root_two<RealType>();
   }
 
   template <class RealType, class Policy>
   inline RealType variance(const skew_normal_distribution<RealType, Policy>& dist)
   {
- BOOST_MATH_STD_USING // for ADL of std functions
-
     using namespace boost::math::constants;
 
- const RealType delta = dist.shape() / sqrt(static_cast<RealType>(1)+dist.shape()*dist.shape());
- RealType variance = dist.scale()*dist.scale()*(static_cast<RealType>(1)-two_div_pi<RealType>()*delta*delta);
+ const RealType delta2 = static_cast<RealType>(1) / (static_cast<RealType>(1)+static_cast<RealType>(1)/(dist.shape()*dist.shape()));
+ //const RealType inv_delta2 = static_cast<RealType>(1)+static_cast<RealType>(1)/(dist.shape()*dist.shape());
+
+ RealType variance = dist.scale()*dist.scale()*(static_cast<RealType>(1)-two_div_pi<RealType>()*delta2);
+ //RealType variance = dist.scale()*dist.scale()*(static_cast<RealType>(1)-two_div_pi<RealType>()/inv_delta2);
+
     return variance;
   }
 
@@ -581,16 +585,14 @@
   template <class RealType, class Policy>
   inline RealType kurtosis_excess(const skew_normal_distribution<RealType, Policy>& dist)
   {
- BOOST_MATH_STD_USING // for ADL of std functions
-
     using namespace boost::math::constants;
 
     static const RealType factor = pi_minus_three<RealType>()*static_cast<RealType>(2);
 
- const RealType delta = dist.shape() / sqrt(static_cast<RealType>(1)+dist.shape()*dist.shape());
+ const RealType delta2 = static_cast<RealType>(1) / (static_cast<RealType>(1)+static_cast<RealType>(1)/(dist.shape()*dist.shape()));
 
- const RealType x = static_cast<RealType>(1)-two_div_pi<RealType>()*delta*delta;
- const RealType y = two_div_pi<RealType>() * delta * delta;
+ const RealType x = static_cast<RealType>(1)-two_div_pi<RealType>()*delta2;
+ const RealType y = two_div_pi<RealType>() * delta2;
 
     return factor * y*y / (x*x);
   }

Modified: sandbox/math/boost/math/special_functions/owens_t.hpp
==============================================================================
--- sandbox/math/boost/math/special_functions/owens_t.hpp (original)
+++ sandbox/math/boost/math/special_functions/owens_t.hpp 2012-04-03 01:50:50 EDT (Tue, 03 Apr 2012)
@@ -105,6 +105,31 @@
 
          } // unsigned short owens_t_compute_code(const RealType h, const RealType a)
 
+ template<typename RealType>
+ inline unsigned short owens_t_get_order(const unsigned short icode, RealType)
+ {
+ static const unsigned short ord[] = {2, 3, 4, 5, 7, 10, 12, 18, 10, 20, 30, 0, 4, 7, 8, 20, 0, 0}; // 18 entries
+
+ BOOST_ASSERT(icode<18);
+
+ return ord[icode];
+ } // unsigned short owens_t_get_order(const unsigned short icode, RealType)
+
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+
+ template<>
+ inline unsigned short owens_t_get_order(const unsigned short icode, long double)
+ {
+ // method ================>>> {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6}
+ static const unsigned short ord[] = {3, 4, 5, 6, 8, 11, 13, 19, 10, 20, 30, 0, 7, 10, 11, 23, 0, 0}; // 18 entries
+
+ BOOST_ASSERT(icode<18);
+
+ return ord[icode];
+ } // unsigned short owens_t_get_order(const unsigned short icode, long double)
+
+#endif // BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+
          // compute the value of Owen's T function with method T1 from the reference paper
          template<typename RealType>
          inline RealType owens_t_T1(const RealType h, const RealType a, const unsigned short m)
@@ -176,11 +201,13 @@
 
          // compute the value of Owen's T function with method T3 from the reference paper
          template<typename RealType>
- inline RealType owens_t_T3(const RealType h, const RealType a, const unsigned short m, const RealType ah)
+ inline RealType owens_t_T3(const RealType h, const RealType a, const RealType ah)
          {
             BOOST_MATH_STD_USING
             using namespace boost::math::constants;
 
+ const unsigned short m = 20;
+
             static const RealType c2[] =
             {
                0.99999999999999987510,
@@ -222,7 +249,83 @@
             } // while( true )
 
             return val;
- } // RealType owens_t_T3(const RealType h, const RealType a, const unsigned short m, const RealType ah)
+ } // RealType owens_t_T3(const RealType h, const RealType a, const RealType ah)
+
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+
+ // compute the value of Owen's T function with method T3 from the reference paper
+ template<>
+ inline long double owens_t_T3(const long double h, const long double a, const long double ah)
+ {
+ BOOST_MATH_STD_USING
+ using namespace boost::math::constants;
+
+ const unsigned short m = 30;
+
+ static const long double c2[] =
+ {
+ 0.99999999999999999999999729978162447266851932041876728736094298092917625009873l,
+ -0.99999999999999999999467056379678391810626533251885323416799874878563998732905968l,
+ 0.99999999999999999824849349313270659391127814689133077036298754586814091034842536l,
+ -0.9999999999999997703859616213643405880166422891953033591551179153879839440241685l,
+ 0.99999999999998394883415238173334565554173013941245103172035286759201504179038147l,
+ -0.9999999999993063616095509371081203145247992197457263066869044528823599399470977l,
+ 0.9999999999797336340409464429599229870590160411238245275855903767652432017766116267l,
+ -0.999999999574958412069046680119051639753412378037565521359444170241346845522403274l,
+ 0.9999999933226234193375324943920160947158239076786103108097456617750134812033362048l,
+ -0.9999999188923242461073033481053037468263536806742737922476636768006622772762168467l,
+ 0.9999992195143483674402853783549420883055129680082932629160081128947764415749728967l,
+ -0.999993935137206712830997921913316971472227199741857386575097250553105958772041501l,
+ 0.99996135597690552745362392866517133091672395614263398912807169603795088421057688716l,
+ -0.99979556366513946026406788969630293820987757758641211293079784585126692672425362469l,
+ 0.999092789629617100153486251423850590051366661947344315423226082520411961968929483l,
+ -0.996593837411918202119308620432614600338157335862888580671450938858935084316004769854l,
+ 0.98910017138386127038463510314625339359073956513420458166238478926511821146316469589567l,
+ -0.970078558040693314521331982203762771512160168582494513347846407314584943870399016019l,
+ 0.92911438683263187495758525500033707204091967947532160289872782771388170647150321633673l,
+ -0.8542058695956156057286980736842905011429254735181323743367879525470479126968822863l,
+ 0.73796526033030091233118357742803709382964420335559408722681794195743240930748630755l,
+ -0.58523469882837394570128599003785154144164680587615878645171632791404210655891158l,
+ 0.415997776145676306165661663581868460503874205343014196580122174949645271353372263l,
+ -0.2588210875241943574388730510317252236407805082485246378222935376279663808416534365l,
+ 0.1375535825163892648504646951500265585055789019410617565727090346559210218472356689l,
+ -0.0607952766325955730493900985022020434830339794955745989150270485056436844239206648l,
+ 0.0216337683299871528059836483840390514275488679530797294557060229266785853764115l,
+ -0.00593405693455186729876995814181203900550014220428843483927218267309209471516256l,
+ 0.0011743414818332946510474576182739210553333860106811865963485870668929503649964142l,
+ -1.489155613350368934073453260689881330166342484405529981510694514036264969925132e-4l,
+ 9.072354320794357587710929507988814669454281514268844884841547607134260303118208e-6l
+ };
+
+ const long double as = a*a;
+ const long double hs = h*h;
+ const long double y = 1.l/hs;
+
+ long double ii = 1;
+ unsigned short i = 0;
+ long double vi = a * exp( -ah*ah*half<long double>() ) * one_div_root_two_pi<long double>();
+ long double zi = owens_t_znorm1(ah)/h;
+ long double val = 0;
+
+ while( true )
+ {
+ BOOST_ASSERT(i < 31);
+ val += zi*c2[i];
+ if( m <= i ) // if( m < i+1 )
+ {
+ val *= exp( -hs*half<long double>() ) * one_div_root_two_pi<long double>();
+ break;
+ } // if( m < i )
+ zi = y * (ii*zi - vi);
+ vi *= as;
+ ii += 2;
+ i++;
+ } // while( true )
+
+ return val;
+ } // long double owens_t_T3(const long double h, const long double a, const long double ah)
+
+#endif // BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 
          // compute the value of Owen's T function with method T4 from the reference paper
          template<typename RealType>
@@ -255,7 +358,7 @@
 
          // compute the value of Owen's T function with method T5 from the reference paper
          template<typename RealType>
- inline RealType owens_t_T5(const RealType h, const RealType a, const unsigned short m)
+ inline RealType owens_t_T5(const RealType h, const RealType a)
          {
             BOOST_MATH_STD_USING
             /*
@@ -266,6 +369,8 @@
                - The wts[] array contains the weights for Gauss-Legendre quadrature scaled with a factor
                  of 1/(2*pi) according to T5(h,a,m).
              */
+
+ const unsigned short m = 13;
             static const RealType pts[] = {0.35082039676451715489E-02,
                0.31279042338030753740E-01, 0.85266826283219451090E-01,
                0.16245071730812277011, 0.25851196049125434828,
@@ -293,7 +398,80 @@
             } // for(unsigned short i = 0; i < m; ++i)
 
             return val*a;
- } // RealType owens_t_T5(const RealType h, const RealType a, const unsigned short m)
+ } // RealType owens_t_T5(const RealType h, const RealType a)
+
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+
+ // compute the value of Owen's T function with method T5 from the reference paper
+ template<>
+ inline long double owens_t_T5(const long double h, const long double a)
+ {
+ BOOST_MATH_STD_USING
+ /*
+ NOTICE:
+ - The pts[] array contains the squares (!) of the abscissas, i.e. the roots of the Legendre
+ polynomial P_n(x), instead of the plain roots as required in Gauss-Legendre
+ quadrature, because T5(h,a,m) contains only x^2 terms.
+ - The wts[] array contains the weights for Gauss-Legendre quadrature scaled with a factor
+ of 1/(2*pi) according to T5(h,a,m).
+ */
+
+ const unsigned short m = 19;
+ static const long double pts[] = {0.0016634282895983227941l,
+ 0.014904509242697054183l,
+ 0.04103478879005817919l,
+ 0.079359853513391511008l,
+ 0.1288612130237615133l,
+ 0.18822336642448518856l,
+ 0.25586876186122962384l,
+ 0.32999972011807857222l,
+ 0.40864620815774761438l,
+ 0.48971819306044782365l,
+ 0.57106118513245543894l,
+ 0.6505134942981533829l,
+ 0.72596367859928091618l,
+ 0.79540665919549865924l,
+ 0.85699701386308739244l,
+ 0.90909804422384697594l,
+ 0.95032536436570154409l,
+ 0.97958418733152273717l,
+ 0.99610366384229088321l};
+ static const long double wts[] = {0.012975111395684900835l,
+ 0.012888764187499150078l,
+ 0.012716644398857307844l,
+ 0.012459897461364705691l,
+ 0.012120231988292330388l,
+ 0.011699908404856841158l,
+ 0.011201723906897224448l,
+ 0.010628993848522759853l,
+ 0.0099855296835573320047l,
+ 0.0092756136096132857933l,
+ 0.0085039700881139589055l,
+ 0.0076757344408814561254l,
+ 0.0067964187616556459109l,
+ 0.005871875456524750363l,
+ 0.0049082589542498110071l,
+ 0.0039119870792519721409l,
+ 0.0028897090921170700834l,
+ 0.0018483371329504443947l,
+ 0.00079623320100438873578l};
+
+ const long double as = a*a;
+ const long double hs = -h*h*boost::math::constants::half<long double>();
+
+ long double val = 0;
+ for(unsigned short i = 0; i < m; ++i)
+ {
+ BOOST_ASSERT(i < 19);
+ const long double r = 1.l + as*pts[i];
+ val += wts[i] * exp( hs*r ) / r;
+ } // for(unsigned short i = 0; i < m; ++i)
+
+ return val*a;
+ } // long double owens_t_T5(const long double h, const long double a)
+
+#endif // BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+
 
          // compute the value of Owen's T function with method T6 from the reference paper
          template<typename RealType>
@@ -321,12 +499,12 @@
          inline RealType owens_t_dispatch(const RealType h, const RealType a, const RealType ah)
          {
             static const unsigned short meth[] = {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6}; // 18 entries
- static const unsigned short ord[] = {2, 3, 4, 5, 7, 10, 12, 18, 10, 20, 30, 20, 4, 7, 8, 20, 13, 0}; // 18 entries
+ //static const unsigned short ord[] = {2, 3, 4, 5, 7, 10, 12, 18, 10, 20, 30, 20, 4, 7, 8, 20, 13, 0}; // 18 entries
 
             RealType val = 0; // avoid compiler warnings, 0 will be overwritten in any case
 
             const unsigned short icode = owens_t_compute_code(h,a);
- const unsigned short m = ord[icode];
+ const unsigned short m = owens_t_get_order(icode, val /* just a dummy for the type */);
 
             // determine the appropriate method, T1 ... T6
             switch( meth[icode] )
@@ -338,13 +516,13 @@
                val = owens_t_T2(h,a,m,ah);
                break;
             case 3: // T3
- val = owens_t_T3(h,a,m,ah);
+ val = owens_t_T3(h,a,ah);
                break;
             case 4: // T4
                val = owens_t_T4(h,a,m);
                break;
             case 5: // T5
- val = owens_t_T5(h,a,m);
+ val = owens_t_T5(h,a);
                break;
             case 6: // T6
                val = owens_t_T6(h,a);

Modified: sandbox/math/libs/math/test/owens_t_T7.hpp
==============================================================================
--- sandbox/math/libs/math/test/owens_t_T7.hpp (original)
+++ sandbox/math/libs/math/test/owens_t_T7.hpp 2012-04-03 01:50:50 EDT (Tue, 03 Apr 2012)
@@ -121,6 +121,8 @@
                 v = hs*v/(static_cast<RealType>(2*k+1));
               }
             val += u*v;
+ if(isinf(val))
+ break;
             memory.push_back(u*v);
           } // while(val != last_val)
 

Modified: sandbox/math/libs/math/test/test_owens_t.cpp
==============================================================================
--- sandbox/math/libs/math/test/test_owens_t.cpp (original)
+++ sandbox/math/libs/math/test/test_owens_t.cpp 2012-04-03 01:50:50 EDT (Tue, 03 Apr 2012)
@@ -152,7 +152,7 @@
 {
   // Basic sanity checks, test data is as accurate as long double,
   // so set tolerance to a few epsilon expressed as a fraction.
- RealType tolerance = boost::math::tools::epsilon<RealType>() * 30; // most OK with 3 eps tolerance.
+ RealType tolerance = boost::math::tools::epsilon<RealType>() * 90; // most OK with 3 eps tolerance.
   cout << "Tolerance = " << tolerance << "." << endl;
 
   using ::boost::math::owens_t;
@@ -160,7 +160,7 @@
 
   // apply log scale because points near zero are more interesting
   for(RealType a = static_cast<RealType>(-10.0l); a < static_cast<RealType>(3l); a+= static_cast<RealType>(0.2l))
- for(RealType h = static_cast<RealType>(-10.0l); h < static_cast<RealType>(4l); h+= static_cast<RealType>(0.2l))
+ for(RealType h = static_cast<RealType>(-10.0l); h < static_cast<RealType>(3.5l); h+= static_cast<RealType>(0.2l))
     {
       const RealType expa = exp(a);
       const RealType exph = exp(h);

Modified: sandbox/math/libs/math/test/test_skew_normal.cpp
==============================================================================
--- sandbox/math/libs/math/test/test_skew_normal.cpp (original)
+++ sandbox/math/libs/math/test/test_skew_normal.cpp 2012-04-03 01:50:50 EDT (Tue, 03 Apr 2012)
@@ -237,8 +237,8 @@
 
    // Shape != 0.
    BOOST_CHECK_CLOSE_FRACTION(
- pdf(skew_normal_distribution<RealType>(1.1, 0.02, 0.03), static_cast<RealType>(3)),
- static_cast<RealType>(0),
+ pdf(skew_normal_distribution<RealType>(3,5,1e-6), static_cast<RealType>(3)),
+ static_cast<RealType>(0.3989422804014326779399460599343818684759L / 5),
       tolerance);
 
 
@@ -321,119 +321,119 @@
 
     // Skew_normal tests with shape != 0.
     {
- RealType tol5 = boost::math::tools::epsilon<RealType>() * 5;
+ //RealType tol5 = boost::math::tools::epsilon<RealType>() * 5;
       RealType tol100 = boost::math::tools::epsilon<RealType>() * 100;
       RealType tol1000 = boost::math::tools::epsilon<RealType>() * 1000;
 
- skew_normal_distribution<RealType> dist(1.1, 0.02, 0.03);
+ //skew_normal_distribution<RealType> dist(1.1, 0.02, 0.03);
 
       BOOST_MATH_STD_USING // ADL of std math lib names.
 
       // Test values from R = see skew_normal_drv.cpp which included the R code used.
       {
- skew_normal_distribution<RealType> dist(1.1, 2.2, -3.3);
+ skew_normal_distribution<RealType> dist(static_cast<RealType>(1.1l), static_cast<RealType>(2.2l), static_cast<RealType>(-3.3l));
 
         BOOST_CHECK_CLOSE( // mean:
            mean(dist)
- , static_cast<RealType>(-0.57990899253985684L), tol1000);
+ , static_cast<RealType>(-0.579908992539856825862549L), tol100);
          BOOST_CHECK_CLOSE( // variance:
           variance(dist)
- , static_cast<RealType>(2.017905776783723L), tol100);
+ , static_cast<RealType>(2.0179057767837232633904L), tol100);
 
         BOOST_CHECK_CLOSE( // skewness:
            skewness(dist)
- , static_cast<RealType>(-0.70985454817153848L), tol1000);
+ , static_cast<RealType>(-0.709854548171537509192897824663L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis:
            kurtosis(dist)
- , static_cast<RealType>(3.L + 0.55387526252417818L), tol1000);
+ , static_cast<RealType>(3.5538752625241790601377L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis excess:
            kurtosis_excess(dist)
- , static_cast<RealType>(0.55387526252417818L), tol1000);
+ , static_cast<RealType>(0.5538752625241790601377L), tol1000);
 
         BOOST_CHECK_CLOSE(
- pdf(dist, static_cast<RealType>(0.4)),
- static_cast<RealType>(0.29414011015659952L),
+ pdf(dist, static_cast<RealType>(0.4L)),
+ static_cast<RealType>(0.294140110156599539564571L),
           tol100);
 
         BOOST_CHECK_CLOSE(
           cdf(dist, static_cast<RealType>(0.4L)),
- static_cast<RealType>(0.73391861892787402L),
+ static_cast<RealType>(0.7339186189278737976326676452L),
           tol1000);
 
         BOOST_CHECK_CLOSE(
           quantile(dist, static_cast<RealType>(0.3L)),
- static_cast<RealType>(-1.180104068086876L),
+ static_cast<RealType>(-1.180104068086875314419247L),
           tol1000);
 
 
       { // mode tests
 
- skew_normal_distribution<RealType> dist(0, 1, 4.);
+ skew_normal_distribution<RealType> dist(static_cast<RealType>(0.l), static_cast<RealType>(1.l), static_cast<RealType>(4.l));
 
         cout << "pdf(dist, 0) = " << pdf(dist, 0) << ", pdf(dist, 0.45) = " << pdf(dist, 0.45) << endl;
        // BOOST_CHECK_CLOSE(mode(dist), boost::math::constants::root_two<RealType>() / 2, tol5);
- BOOST_CHECK_CLOSE(mode(dist), 0.695, tol5);
+ BOOST_CHECK_CLOSE(mode(dist), static_cast<RealType>(0.41697299497388863932L), tol1000);
       }
 
 
       }
       {
- skew_normal_distribution<RealType> dist(1.1, 0.02, 0.03);
+ skew_normal_distribution<RealType> dist(static_cast<RealType>(1.1l), static_cast<RealType>(0.02l), static_cast<RealType>(0.03l));
 
         BOOST_CHECK_CLOSE( // mean:
            mean(dist)
- , static_cast<RealType>(1.1004785154529559L), tol5);
+ , static_cast<RealType>(1.1004785154529557886162L), tol100);
         BOOST_CHECK_CLOSE( // variance:
           variance(dist)
- , static_cast<RealType>(0.00039977102296128255L), tol100);
+ , static_cast<RealType>(0.00039977102296128251645L), tol100);
 
         BOOST_CHECK_CLOSE( // skewness:
            skewness(dist)
- , static_cast<RealType>(5.8834811259890419e-006L), tol1000);
+ , static_cast<RealType>(5.8834811259890359782e-006L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis:
            kurtosis(dist)
- , static_cast<RealType>(3.L + 9.2903475812137596e-008L), tol1000);
+ , static_cast<RealType>(3.L + 9.2903475812137800239002e-008L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis excess:
            kurtosis_excess(dist)
- , static_cast<RealType>(9.2903475812137596e-008L), tol1000 * 10);
+ , static_cast<RealType>(9.2903475812137800239002e-008L), tol1000);
       }
       {
- skew_normal_distribution<RealType> dist(10.1, 5., -0.03);
+ skew_normal_distribution<RealType> dist(static_cast<RealType>(10.1l), static_cast<RealType>(5.l), static_cast<RealType>(-0.03l));
         BOOST_CHECK_CLOSE( // mean:
            mean(dist)
- , static_cast<RealType>(9.9803711367610521L), tol5);
+ , static_cast<RealType>(9.9803711367610528459485937L), tol100);
         BOOST_CHECK_CLOSE( // variance:
           variance(dist)
- , static_cast<RealType>(24.985688935080159L), tol100);
+ , static_cast<RealType>(24.98568893508015727823L), tol100);
 
         BOOST_CHECK_CLOSE( // skewness:
            skewness(dist)
- , static_cast<RealType>(-5.8834811259890411e-006L), tol1000);
+ , static_cast<RealType>(-5.8834811259890359782085e-006L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis:
            kurtosis(dist)
- , static_cast<RealType>(3.L + 9.2903475812137596e-008L), tol1000);
+ , static_cast<RealType>(3.L + 9.2903475812137800239002e-008L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis excess:
            kurtosis_excess(dist)
- , static_cast<RealType>(9.2903475812137596e-008L), tol1000);
+ , static_cast<RealType>(9.2903475812137800239002e-008L), tol1000);
       }
       {
- skew_normal_distribution<RealType> dist(-10.1, 5., 30.);
+ skew_normal_distribution<RealType> dist(static_cast<RealType>(-10.1l), static_cast<RealType>(5.l), static_cast<RealType>(30.l));
         BOOST_CHECK_CLOSE( // mean:
            mean(dist)
- , static_cast<RealType>(-6.1127916967413842L), tol100);
+ , static_cast<RealType>(-6.11279169674138408531365L), tol100);
         BOOST_CHECK_CLOSE( // variance:
           variance(dist)
- , static_cast<RealType>(9.1021699464255477L), tol100);
+ , static_cast<RealType>(9.10216994642554914628242L), tol100);
 
         BOOST_CHECK_CLOSE( // skewness:
            skewness(dist)
- , static_cast<RealType>(0.99072425443686996L), tol1000);
+ , static_cast<RealType>(0.99072425443686904424L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis:
            kurtosis(dist)
- , static_cast<RealType>(3.L + 0.86388620084060674L), tol1000);
+ , static_cast<RealType>(3.L + 0.8638862008406084244563L), tol1000);
         BOOST_CHECK_CLOSE( // kurtosis excess:
            kurtosis_excess(dist)
- , static_cast<RealType>(0.86388620084060674L), tol1000);
+ , static_cast<RealType>(0.8638862008406084244563L), tol1000);
       }
 
 


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