Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56650 - trunk/boost/math/distributions
From: john_at_[hidden]
Date: 2009-10-08 12:03:26


Author: johnmaddock
Date: 2009-10-08 12:03:25 EDT (Thu, 08 Oct 2009)
New Revision: 56650
URL: http://svn.boost.org/trac/boost/changeset/56650

Log:
Change iteration limits to use get_epsilon().
Text files modified:
   trunk/boost/math/distributions/non_central_beta.hpp | 6 +++---
   trunk/boost/math/distributions/non_central_chi_squared.hpp | 8 ++++----
   trunk/boost/math/distributions/non_central_t.hpp | 6 +++---
   3 files changed, 10 insertions(+), 10 deletions(-)

Modified: trunk/boost/math/distributions/non_central_beta.hpp
==============================================================================
--- trunk/boost/math/distributions/non_central_beta.hpp (original)
+++ trunk/boost/math/distributions/non_central_beta.hpp 2009-10-08 12:03:25 EDT (Thu, 08 Oct 2009)
@@ -38,7 +38,7 @@
             // Variables come first:
             //
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T l2 = lam / 2;
             //
             // k is the starting point for iteration, and is the
@@ -116,7 +116,7 @@
             // Variables come first:
             //
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T l2 = lam / 2;
             //
             // k is the starting point for iteration, and is the
@@ -499,7 +499,7 @@
             // Variables come first:
             //
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T l2 = lam / 2;
             //
             // k is the starting point for iteration, and is the

Modified: trunk/boost/math/distributions/non_central_chi_squared.hpp
==============================================================================
--- trunk/boost/math/distributions/non_central_chi_squared.hpp (original)
+++ trunk/boost/math/distributions/non_central_chi_squared.hpp 2009-10-08 12:03:25 EDT (Thu, 08 Oct 2009)
@@ -63,7 +63,7 @@
             T del = f / 2;
             T y = x / 2;
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T sum = init_sum;
             //
             // k is the starting location for iteration, we'll
@@ -158,7 +158,7 @@
                return sum;
 
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
 
             int i;
             T lterm(0), term(0);
@@ -203,7 +203,7 @@
             if(y == 0)
                return 0;
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T errorf(0), errorb(0);
 
             T x = y / 2;
@@ -289,7 +289,7 @@
             //
             BOOST_MATH_STD_USING
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T x2 = x / 2;
             T n2 = n / 2;
             T l2 = lambda / 2;

Modified: trunk/boost/math/distributions/non_central_t.hpp
==============================================================================
--- trunk/boost/math/distributions/non_central_t.hpp (original)
+++ trunk/boost/math/distributions/non_central_t.hpp 2009-10-08 12:03:25 EDT (Thu, 08 Oct 2009)
@@ -34,7 +34,7 @@
             // Variables come first:
             //
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = policies::get_epsilon<T, Policy>();
             T d2 = delta * delta / 2;
             //
             // k is the starting point for iteration, and is the
@@ -104,7 +104,7 @@
             // Variables come first:
             //
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T d2 = delta * delta / 2;
             //
             // k is the starting point for iteration, and is the
@@ -319,7 +319,7 @@
             // Variables come first:
             //
             boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
             T d2 = delta * delta / 2;
             //
             // k is the starting point for iteration, and is the


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