Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75403 - in trunk/boost/math: special_functions special_functions/detail tools
From: john_at_[hidden]
Date: 2011-11-08 07:49:28


Author: johnmaddock
Date: 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
New Revision: 75403
URL: http://svn.boost.org/trac/boost/changeset/75403

Log:
More fixes for expression template types.
Text files modified:
   trunk/boost/math/special_functions/detail/bessel_jy_asym.hpp | 6 ++--
   trunk/boost/math/special_functions/detail/igamma_large.hpp | 2
   trunk/boost/math/special_functions/digamma.hpp | 6 ++--
   trunk/boost/math/special_functions/erf.hpp | 56 ++++++++++++++++++++--------------------
   trunk/boost/math/special_functions/expint.hpp | 6 ++--
   trunk/boost/math/special_functions/zeta.hpp | 34 ++++++++++++------------
   trunk/boost/math/tools/toms748_solve.hpp | 5 ++-
   7 files changed, 58 insertions(+), 57 deletions(-)

Modified: trunk/boost/math/special_functions/detail/bessel_jy_asym.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/bessel_jy_asym.hpp (original)
+++ trunk/boost/math/special_functions/detail/bessel_jy_asym.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -215,21 +215,21 @@
 inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<53>&)
 {
    // double case:
- T v2 = (std::max)(T(3), v * v);
+ T v2 = (std::max)(T(3), T(v * v));
    return v2 * 33 /*73*/;
 }
 template <class T>
 inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<64>&)
 {
    // 80-bit extended-double case:
- T v2 = (std::max)(T(3), v * v);
+ T v2 = (std::max)(T(3), T(v * v));
    return v2 * 121 /*266*/;
 }
 template <class T>
 inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<113>&)
 {
    // 128-bit long double case:
- T v2 = (std::max)(T(3), v * v);
+ T v2 = (std::max)(T(3), T(v * v));
    return v2 * 39154 /*85700*/;
 }
 

Modified: trunk/boost/math/special_functions/detail/igamma_large.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/igamma_large.hpp (original)
+++ trunk/boost/math/special_functions/detail/igamma_large.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -749,7 +749,7 @@
    workspace[12] = tools::evaluate_polynomial(C12, z);
    workspace[13] = -0.0059475779383993002845382844736066323L;
 
- T result = tools::evaluate_polynomial(workspace, 1/a);
+ T result = tools::evaluate_polynomial(workspace, T(1/a));
    result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
    if(x < a)
       result = -result;

Modified: trunk/boost/math/special_functions/digamma.hpp
==============================================================================
--- trunk/boost/math/special_functions/digamma.hpp (original)
+++ trunk/boost/math/special_functions/digamma.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -247,7 +247,7 @@
    T g = x - root1;
    g -= root2;
    g -= root3;
- T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1);
+ T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1));
    T result = g * Y + g * r;
 
    return result;
@@ -296,7 +296,7 @@
    T g = x - root1;
    g -= root2;
    g -= root3;
- T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1);
+ T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1));
    T result = g * Y + g * r;
 
    return result;
@@ -336,7 +336,7 @@
    };
    T g = x - root;
    g -= root_minor;
- T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1);
+ T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1));
    T result = g * Y + g * r;
 
    return result;

Modified: trunk/boost/math/special_functions/erf.hpp
==============================================================================
--- trunk/boost/math/special_functions/erf.hpp (original)
+++ trunk/boost/math/special_functions/erf.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -178,11 +178,11 @@
    if(z < 0)
    {
       if(!invert)
- return -erf_imp(-z, invert, pol, t);
+ return -erf_imp(T(-z), invert, pol, t);
       else if(z < -0.5)
- return 2 - erf_imp(-z, invert, pol, t);
+ return 2 - erf_imp(T(-z), invert, pol, t);
       else
- return 1 + erf_imp(-z, false, pol, t);
+ return 1 + erf_imp(T(-z), false, pol, t);
    }
 
    T result;
@@ -264,7 +264,7 @@
             0.0113385233577001411017L,
             0.337511472483094676155e-5L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 0.5) / tools::evaluate_polynomial(Q, z - 0.5);
+ result = Y + tools::evaluate_polynomial(P, T(z - 0.5)) / tools::evaluate_polynomial(Q, T(z - 0.5));
          result *= exp(-z * z) / z;
       }
       else if(z < 2.5f)
@@ -290,7 +290,7 @@
             0.0563921837420478160373L,
             0.00410369723978904575884L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 1.5) / tools::evaluate_polynomial(Q, z - 1.5);
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.5)) / tools::evaluate_polynomial(Q, T(z - 1.5));
          result *= exp(-z * z) / z;
       }
       else if(z < 4.5f)
@@ -316,7 +316,7 @@
             0.0105982906484876531489L,
             0.000479411269521714493907L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 3.5) / tools::evaluate_polynomial(Q, z - 3.5);
+ result = Y + tools::evaluate_polynomial(P, T(z - 3.5)) / tools::evaluate_polynomial(Q, T(z - 3.5));
          result *= exp(-z * z) / z;
       }
       else
@@ -344,7 +344,7 @@
             13.5064170191802889145L,
             5.48409182238641741584L,
          };
- result = Y + tools::evaluate_polynomial(P, 1 / z) / tools::evaluate_polynomial(Q, 1 / z);
+ result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
          result *= exp(-z * z) / z;
       }
    }
@@ -376,11 +376,11 @@
    if(z < 0)
    {
       if(!invert)
- return -erf_imp(-z, invert, pol, t);
+ return -erf_imp(T(-z), invert, pol, t);
       else if(z < -0.5)
- return 2 - erf_imp(-z, invert, pol, t);
+ return 2 - erf_imp(T(-z), invert, pol, t);
       else
- return 1 + erf_imp(-z, false, pol, t);
+ return 1 + erf_imp(T(-z), false, pol, t);
    }
 
    T result;
@@ -426,7 +426,7 @@
             0.000650511752687851548735L,
             0.189532519105655496778e-4L,
          };
- result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z));
+ result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z)));
       }
    }
    else if(invert ? (z < 110) : (z < 6.4f))
@@ -461,7 +461,7 @@
             0.0396649631833002269861L,
             0.00279220237309449026796L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 0.5f) / tools::evaluate_polynomial(Q, z - 0.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f));
          result *= exp(-z * z) / z;
       }
       else if(z < 2.5)
@@ -489,7 +489,7 @@
             0.0158027197831887485261L,
             0.000897871370778031611439L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 1.5f) / tools::evaluate_polynomial(Q, z - 1.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f));
          result *= exp(-z * z) / z;
       }
       else if(z < 4.5)
@@ -517,7 +517,7 @@
             0.00221657568292893699158L,
             0.804149464190309799804e-4L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 3.5f) / tools::evaluate_polynomial(Q, z - 3.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 3.5f)) / tools::evaluate_polynomial(Q, T(z - 3.5f));
          result *= exp(-z * z) / z;
       }
       else
@@ -549,7 +549,7 @@
             104.365251479578577989L,
             30.8365511891224291717L,
          };
- result = Y + tools::evaluate_polynomial(P, 1 / z) / tools::evaluate_polynomial(Q, 1 / z);
+ result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
          result *= exp(-z * z) / z;
       }
    }
@@ -581,11 +581,11 @@
    if(z < 0)
    {
       if(!invert)
- return -erf_imp(-z, invert, pol, t);
+ return -erf_imp(T(-z), invert, pol, t);
       else if(z < -0.5)
- return 2 - erf_imp(-z, invert, pol, t);
+ return 2 - erf_imp(T(-z), invert, pol, t);
       else
- return 1 + erf_imp(-z, false, pol, t);
+ return 1 + erf_imp(T(-z), false, pol, t);
    }
 
    T result;
@@ -635,7 +635,7 @@
             0.196230608502104324965623171516808796e-5L,
             0.313388521582925207734229967907890146e-7L,
          };
- result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z));
+ result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z)));
       }
    }
    else if(invert ? (z < 110) : (z < 8.65f))
@@ -676,7 +676,7 @@
             0.226988669466501655990637599399326874e-4L,
             0.270666232259029102353426738909226413e-10L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 0.5f) / tools::evaluate_polynomial(Q, z - 0.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f));
          result *= exp(-z * z) / z;
       }
       else if(z < 1.5)
@@ -710,7 +710,7 @@
             0.000349871943711566546821198612518656486L,
             0.123749319840299552925421880481085392e-4L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 1.0f) / tools::evaluate_polynomial(Q, z - 1.0f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.0f)) / tools::evaluate_polynomial(Q, T(z - 1.0f));
          result *= exp(-z * z) / z;
       }
       else if(z < 2.25)
@@ -745,7 +745,7 @@
             0.507158721790721802724402992033269266e-5L,
             0.18647774409821470950544212696270639e-12L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 1.5f) / tools::evaluate_polynomial(Q, z - 1.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f));
          result *= exp(-z * z) / z;
       }
       else if (z < 3)
@@ -779,7 +779,7 @@
             0.686843205749767250666787987163701209e-4L,
             0.192093541425429248675532015101904262e-5L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 2.25f) / tools::evaluate_polynomial(Q, z - 2.25f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 2.25f)) / tools::evaluate_polynomial(Q, T(z - 2.25f));
          result *= exp(-z * z) / z;
       }
       else if(z < 3.5)
@@ -811,7 +811,7 @@
             0.000144243326443913171313947613547085553L,
             0.407763415954267700941230249989140046e-5L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 3.0f) / tools::evaluate_polynomial(Q, z - 3.0f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 3.0f)) / tools::evaluate_polynomial(Q, T(z - 3.0f));
          result *= exp(-z * z) / z;
       }
       else if(z < 5.5)
@@ -847,7 +847,7 @@
             0.655068544833064069223029299070876623e-6L,
             0.11005507545746069573608988651927452e-7L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 4.5f) / tools::evaluate_polynomial(Q, z - 4.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 4.5f)) / tools::evaluate_polynomial(Q, T(z - 4.5f));
          result *= exp(-z * z) / z;
       }
       else if(z < 7.5)
@@ -881,7 +881,7 @@
             0.674128352521481412232785122943508729e-6L,
             0.997637501418963696542159244436245077e-8L,
          };
- result = Y + tools::evaluate_polynomial(P, z - 6.5f) / tools::evaluate_polynomial(Q, z - 6.5f);
+ result = Y + tools::evaluate_polynomial(P, T(z - 6.5f)) / tools::evaluate_polynomial(Q, T(z - 6.5f));
          result *= exp(-z * z) / z;
       }
       else if(z < 11.5)
@@ -915,7 +915,7 @@
             0.164033049810404773469413526427932109e-4L,
             0.356615210500531410114914617294694857e-6L,
          };
- result = Y + tools::evaluate_polynomial(P, z / 2 - 4.75f) / tools::evaluate_polynomial(Q, z / 2 - 4.75f);
+ result = Y + tools::evaluate_polynomial(P, T(z / 2 - 4.75f)) / tools::evaluate_polynomial(Q, T(z / 2 - 4.75f));
          result *= exp(-z * z) / z;
       }
       else
@@ -953,7 +953,7 @@
             799.359797306084372350264298361110448L,
             72.7415265778588087243442792401576737L,
          };
- result = Y + tools::evaluate_polynomial(P, 1 / z) / tools::evaluate_polynomial(Q, 1 / z);
+ result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
          result *= exp(-z * z) / z;
       }
    }

Modified: trunk/boost/math/special_functions/expint.hpp
==============================================================================
--- trunk/boost/math/special_functions/expint.hpp (original)
+++ trunk/boost/math/special_functions/expint.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -517,7 +517,7 @@
    BOOST_MATH_STD_USING
    static const char* function = "boost::math::expint<%1%>(%1%)";
    if(z < 0)
- return -expint_imp(1, -z, pol, tag);
+ return -expint_imp(1, T(-z), pol, tag);
    if(z == 0)
       return -policies::raise_overflow_error<T>(function, 0, pol);
 
@@ -729,7 +729,7 @@
    BOOST_MATH_STD_USING
    static const char* function = "boost::math::expint<%1%>(%1%)";
    if(z < 0)
- return -expint_imp(1, -z, pol, tag);
+ return -expint_imp(1, T(-z), pol, tag);
    if(z == 0)
       return -policies::raise_overflow_error<T>(function, 0, pol);
 
@@ -964,7 +964,7 @@
    BOOST_MATH_STD_USING
    static const char* function = "boost::math::expint<%1%>(%1%)";
    if(z < 0)
- return -expint_imp(1, -z, pol, tag);
+ return -expint_imp(1, T(-z), pol, tag);
    if(z == 0)
       return -policies::raise_overflow_error<T>(function, 0, pol);
 

Modified: trunk/boost/math/special_functions/zeta.hpp
==============================================================================
--- trunk/boost/math/special_functions/zeta.hpp (original)
+++ trunk/boost/math/special_functions/zeta.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -189,7 +189,7 @@
          0.000255784226140488490982,
          0.10991819782396112081e-4,
       };
- result = tools::evaluate_polynomial(P, -sc) / tools::evaluate_polynomial(Q, -sc);
+ result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
       result += 1 / (-sc);
    }
    else if(s <= 4)
@@ -214,7 +214,7 @@
          0.106951867532057341359e-4,
          0.236276623974978646399e-7,
       };
- result = tools::evaluate_polynomial(P, s - 2) / tools::evaluate_polynomial(Q, s - 2);
+ result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
       result += Y + 1 / (-sc);
    }
    else if(s <= 7)
@@ -242,7 +242,7 @@
          0.718833729365459760664e-8,
          -0.1129200113474947419e-9,
       };
- result = tools::evaluate_polynomial(P, s - 4) / tools::evaluate_polynomial(Q, s - 4);
+ result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
       result = 1 + exp(result);
    }
    else if(s < 15)
@@ -270,7 +270,7 @@
          -0.833378440625385520576e-10,
          0.699841545204845636531e-12,
         };
- result = tools::evaluate_polynomial(P, s - 7) / tools::evaluate_polynomial(Q, s - 7);
+ result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7));
       result = 1 + exp(result);
    }
    else if(s < 36)
@@ -297,7 +297,7 @@
          0.118507153474022900583e-7,
          0.222609483627352615142e-14,
       };
- result = tools::evaluate_polynomial(P, s - 15) / tools::evaluate_polynomial(Q, s - 15);
+ result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15));
       result = 1 + exp(result);
    }
    else if(s < 56)
@@ -367,7 +367,7 @@
          0.635994377921861930071e-5L,
          0.226583954978371199405e-7L,
       };
- result = tools::evaluate_polynomial(P, -sc) / tools::evaluate_polynomial(Q, -sc);
+ result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
       result += 1 / (-sc);
    }
    else if(s <= 4)
@@ -394,7 +394,7 @@
          0.278090318191657278204e-6L,
          -0.19683620233222028478e-8L,
       };
- result = tools::evaluate_polynomial(P, s - 2) / tools::evaluate_polynomial(Q, s - 2);
+ result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
       result += Y + 1 / (-sc);
    }
    else if(s <= 7)
@@ -421,7 +421,7 @@
          -0.927884739284359700764e-8L,
          0.119810501805618894381e-9L,
       };
- result = tools::evaluate_polynomial(P, s - 4) / tools::evaluate_polynomial(Q, s - 4);
+ result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
       result = 1 + exp(result);
    }
    else if(s < 15)
@@ -450,7 +450,7 @@
          0.117957556472335968146e-7L,
          -0.193432300973017671137e-12L,
         };
- result = tools::evaluate_polynomial(P, s - 7) / tools::evaluate_polynomial(Q, s - 7);
+ result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7));
       result = 1 + exp(result);
    }
    else if(s < 42)
@@ -480,7 +480,7 @@
          -0.939798249922234703384e-16L,
          0.264584017421245080294e-18L,
       };
- result = tools::evaluate_polynomial(P, s - 15) / tools::evaluate_polynomial(Q, s - 15);
+ result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15));
       result = 1 + exp(result);
    }
    else if(s < 63)
@@ -565,7 +565,7 @@
          -0.377105263588822468076813329270698909e-11L,
          -0.581926559304525152432462127383600681e-13L,
       };
- result = tools::evaluate_polynomial(P, -sc) / tools::evaluate_polynomial(Q, -sc);
+ result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
       result += 1 / (-sc);
    }
    else if(s <= 4)
@@ -602,7 +602,7 @@
          0.105677416606909614301995218444080615e-11L,
          0.547223964564003701979951154093005354e-15L,
       };
- result = tools::evaluate_polynomial(P, s - 2) / tools::evaluate_polynomial(Q, s - 2);
+ result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
       result += Y + 1 / (-sc);
    }
    else if(s <= 6)
@@ -643,7 +643,7 @@
          -0.275363878344548055574209713637734269e-13L,
          0.221564186807357535475441900517843892e-15L,
       };
- result = tools::evaluate_polynomial(P, s - 4) / tools::evaluate_polynomial(Q, s - 4);
+ result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
       result -= Y;
       result = 1 + exp(result);
    }
@@ -683,7 +683,7 @@
          0.294670713571839023181857795866134957e-16L,
          -0.147003914536437243143096875069813451e-18L,
         };
- result = tools::evaluate_polynomial(P, s - 6) / tools::evaluate_polynomial(Q, s - 6);
+ result = tools::evaluate_polynomial(P, T(s - 6)) / tools::evaluate_polynomial(Q, T(s - 6));
       result = 1 + exp(result);
    }
    else if(s < 17)
@@ -721,7 +721,7 @@
          0.887948682401000153828241615760146728e-19L,
          -0.34980761098820347103967203948619072e-21L,
         };
- result = tools::evaluate_polynomial(P, s - 10) / tools::evaluate_polynomial(Q, s - 10);
+ result = tools::evaluate_polynomial(P, T(s - 10)) / tools::evaluate_polynomial(Q, T(s - 10));
       result = 1 + exp(result);
    }
    else if(s < 30)
@@ -760,7 +760,7 @@
          -0.291354445847552426900293580511392459e-22L,
          0.73614324724785855925025452085443636e-25L,
       };
- result = tools::evaluate_polynomial(P, s - 17) / tools::evaluate_polynomial(Q, s - 17);
+ result = tools::evaluate_polynomial(P, T(s - 17)) / tools::evaluate_polynomial(Q, T(s - 17));
       result = 1 + exp(result);
    }
    else if(s < 74)
@@ -801,7 +801,7 @@
          -0.557103423021951053707162364713587374e-31L,
          0.618708773442584843384712258199645166e-34L,
       };
- result = tools::evaluate_polynomial(P, s - 30) / tools::evaluate_polynomial(Q, s - 30);
+ result = tools::evaluate_polynomial(P, T(s - 30)) / tools::evaluate_polynomial(Q, T(s - 30));
       result = 1 + exp(result);
    }
    else if(s < 117)

Modified: trunk/boost/math/tools/toms748_solve.hpp
==============================================================================
--- trunk/boost/math/tools/toms748_solve.hpp (original)
+++ trunk/boost/math/tools/toms748_solve.hpp 2011-11-08 07:49:27 EST (Tue, 08 Nov 2011)
@@ -26,7 +26,7 @@
    eps_tolerance(unsigned bits)
    {
       BOOST_MATH_STD_USING
- eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(2 * tools::epsilon<T>()));
+ eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(4 * tools::epsilon<T>()));
    }
    bool operator()(const T& a, const T& b)
    {
@@ -422,9 +422,10 @@
       e = d;
       fe = fd;
       detail::bracket(f, a, b, c, fa, fb, d, fd);
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ BOOST_MATH_INSTRUMENT_CODE(" tol = " << T((fabs(a) - fabs(b)) / fabs(a)));
       if((0 == --count) || (fa == 0) || tol(a, b))
          break;
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
       //
       // And finally... check to see if an additional bisection step is
       // to be taken, we do this if we're not converging fast enough:


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