Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-08-30 06:13:17


Author: johnmaddock
Date: 2007-08-30 06:13:13 EDT (Thu, 30 Aug 2007)
New Revision: 39066
URL: http://svn.boost.org/trac/boost/changeset/39066

Log:
Added some instrumentation to help track down some Mac OS failures.
Text files modified:
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp | 6 ++++++
   sandbox/math_toolkit/boost/math/special_functions/erf.hpp | 20 ++++++++++++++++++++
   2 files changed, 26 insertions(+), 0 deletions(-)

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp 2007-08-30 06:13:13 EDT (Thu, 30 Aug 2007)
@@ -19,6 +19,8 @@
 template <typename T, typename Policy>
 T bessel_k0(T x, const Policy& pol)
 {
+ BOOST_MATH_INSTRUMENT_CODE(x);
+
     static const T P1[] = {
          static_cast<T>(2.4708152720399552679e+03L),
          static_cast<T>(5.9169059852270512312e+03L),
@@ -100,6 +102,10 @@
         r = evaluate_polynomial(P3, y) / evaluate_polynomial(Q3, y);
         factor = exp(-x) / sqrt(x);
         value = factor * r;
+ BOOST_MATH_INSTRUMENT_CODE("y = " << y);
+ BOOST_MATH_INSTRUMENT_CODE("r = " << r);
+ BOOST_MATH_INSTRUMENT_CODE("factor = " << factor);
+ BOOST_MATH_INSTRUMENT_CODE("value = " << value);
     }
 
     return value;

Modified: sandbox/math_toolkit/boost/math/special_functions/erf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/erf.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/erf.hpp 2007-08-30 06:13:13 EDT (Thu, 30 Aug 2007)
@@ -113,6 +113,8 @@
 {
    using namespace std;
 
+ BOOST_MATH_INSTRUMENT_CODE("Generic erf_imp called");
+
    if(z < 0)
    {
       if(!invert)
@@ -167,6 +169,8 @@
 {
    using namespace std;
 
+ BOOST_MATH_INSTRUMENT_CODE("53-bit precision erf_imp called");
+
    if(z < 0)
    {
       if(!invert)
@@ -318,6 +322,8 @@
 {
    using namespace std;
 
+ BOOST_MATH_INSTRUMENT_CODE("64-bit precision erf_imp called");
+
    if(z < 0)
    {
       if(!invert)
@@ -506,6 +512,8 @@
 {
    using namespace std;
 
+ BOOST_MATH_INSTRUMENT_CODE("113-bit precision erf_imp called");
+
    if(z < 0)
    {
       if(!invert)
@@ -749,6 +757,10 @@
       policies::discrete_quantile<>,
       policies::assert_undefined<> >::type forwarding_policy;
 
+ BOOST_MATH_INSTRUMENT_CODE("result_type = " << typeid(result_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("value_type = " << typeid(value_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("precision_type = " << typeid(precision_type).name());
+
    typedef typename mpl::if_<
       mpl::less_equal<precision_type, mpl::int_<0> >,
       mpl::int_<0>,
@@ -767,6 +779,8 @@
>::type
>::type tag_type;
 
+ BOOST_MATH_INSTRUMENT_CODE("tag_type = " << typeid(tag_type).name());
+
    return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
       static_cast<value_type>(z),
       false,
@@ -787,6 +801,10 @@
       policies::discrete_quantile<>,
       policies::assert_undefined<> >::type forwarding_policy;
 
+ BOOST_MATH_INSTRUMENT_CODE("result_type = " << typeid(result_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("value_type = " << typeid(value_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("precision_type = " << typeid(precision_type).name());
+
    typedef typename mpl::if_<
       mpl::less_equal<precision_type, mpl::int_<0> >,
       mpl::int_<0>,
@@ -805,6 +823,8 @@
>::type
>::type tag_type;
 
+ BOOST_MATH_INSTRUMENT_CODE("tag_type = " << typeid(tag_type).name());
+
    return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
       static_cast<value_type>(z),
       true,


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