Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2008-02-23 04:46:44


Author: johnmaddock
Date: 2008-02-23 04:46:43 EST (Sat, 23 Feb 2008)
New Revision: 43400
URL: http://svn.boost.org/trac/boost/changeset/43400

Log:
Fix bug that effects the behaviour when the result is negative.
Text files modified:
   sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp 2008-02-23 04:46:43 EST (Sat, 23 Feb 2008)
@@ -96,11 +96,11 @@
    }
    else if(c <= a + fabs(a) * tol)
    {
- c = a * (1 + tol);
+ c = a + fabs(a) * tol;
    }
    else if(c >= b - fabs(b) * tol)
    {
- c = b * (1 - tol);
+ c = b - fabs(a) * tol;
    }
    //
    // OK, lets invoke f(c):


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