Modify

Ticket #6001 (closed Bugs: fixed)

Opened 3 years ago

Last modified 2 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:

Description

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

Attachments

Change History

comment:1 Changed 3 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 2 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

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.