Subject: [Boost-bugs] [Boost C++ Libraries] #6001: math::tools::roots eps_tolerance wrong behaviour at 0. 0.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-09 17:50:11
#6001: math::tools::roots eps_tolerance wrong behaviour at 0. 0.
---------------------------------------+------------------------------------
Reporter: matwey.kornilov@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.47.0 | Severity: Problem
Keywords: |
---------------------------------------+------------------------------------
at line 34 of toms748_solve.hpp:
{{{return (fabs(a - b) / (std::min)(fabs(a), fabs(b))) <= eps;}}}
this leads to wrong behavior when a=b=0.
fix is trivial:
{{{return fabs(a - b) <= eps * (std::min)(fabs(a), fabs(b));}}}
does almost the same, but it is correct when a=b=0
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6001> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC