At the moment the function detects when the solution is close to the margins of the bracket, but it cannot be trusted 100%. It is not clear how close to the margins the brent() method can get, hence it is difficult to define a clear margin of safety (not the margin of safety is represented by aTol = 0.05).
Problems might arise if the bracket size brac gets small, so that its size is comparable to tol.
At the moment the function detects when the solution is close to the margins of the bracket, but it cannot be trusted 100%. It is not clear how close to the margins the
brent()
method can get, hence it is difficult to define a clear margin of safety (not the margin of safety is represented byaTol = 0.05
).Problems might arise if the bracket size
brac
gets small, so that its size is comparable totol
.