|
Boost Users : |
From: Shriramana Sharma (samjnaa_at_[hidden])
Date: 2021-01-28 05:44:50
Hello. Another point I note:
https://github.com/boostorg/math/blob/develop/include/boost/math/tools/toms748_solve.hpp#L109
```
else if(c <= a + fabs(a) * tol)
{
c = a + fabs(a) * tol;
}
else if(c >= b - fabs(b) * tol)
{
c = b - fabs(b) * tol;
}
```
If the intent is that a + fabs(a) * tol and b - fabs(b) * tol are the
values closest to a and b allowable for c, shouldn't the tests above
them test only for < and > and not <= and >=? I mean if the variable
is already equal to the allowed value, then why compute the value
again and assign it to the variable?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net