Ticket #6001 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

math::tools::roots eps_tolerance wrong behaviour at 0. 0.

Reported by: matwey.kornilov@… Owned by: johnmaddock
Milestone: To Be Determined Component: math
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:


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


Change History

comment:1 Changed 6 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

(In [74890]) Remove unused constants. Fix expression for tolerance in eps_tolerance. Add include guards to prime.hpp. Fixes #5982. Fixes #5927. Fixes #6001.

comment:2 Changed 6 years ago by johnmaddock

(In [74984]) Merge recent bug fixes from Trunk. Refs #6014 Refs #5832 Refs #5934 Refs #6001 Refs #5982 Refs #5914 Refs #5927


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.