Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6001 closed Bugs (fixed)

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 (0)

Change History (2)

comment:1 Changed 6 years ago by johnmaddock

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

(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 Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain johnmaddock.
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.