Calc.Brent Method

Computes a Brent-style root bracketing. Returns true on success, or false on failure. Failure can only happen if the function value at xmin and xmax has the same sign, and the function values at xmin/xmax is not within zero tolerance.
Public Shared Function Brent( _ 
ByVal xmin As Double, _ 
ByVal xmax As Double, _ 
ByVal function As Func(Of Double, Double), _ 
ByRef res As Double, _ 
ByVal tol As Double, _ 
ByVal zerotol As Double
) As Boolean
This language is not supported or no code example is available.
public static bool Brent( 
double xmin
double xmax
Func<double, double> function
out double res
double tol
double zerotol 
)
This language is not supported or no code example is available.
public:  
static bool Brent( 
double xmin
double xmax
Func<double, double>^ function
double& res
double tol
double zerotol 
)
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.

Parameters

xmin
double

Lower bound for root search.

xmax
double

Upper bound for root search.

function
Func<double, double>

The function to evaluate.

res
double

The x value for the root.

tol
double

The iteration stops when this tolerance is reached. If never reached it stops after 1000 iterations.

zerotol
double

If abs(funtion(xmin or xmax)) xmin/xmax is smaller than this value and same signs for xmin/xmax is sent, it is reported as success. This is to find roots close to 0 but with a small tolerance error. Set to negative to disable.

Return Value

bool

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition