Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.0
-
None
Description
The BrentSolver detects a change in sign using:
if (x * y < 0) {
This does not work if the product is zero as is the case with sub-normal numbers. The sign of the zero can be compared using:
if (Double.compare(x * y, 0.0) < 0) {
This will detect -0.0 and allows the solver to search the bracket interval.