RobustSolver.TryFindZero Method

Attempts to find the zero of the specified function within the given interval.

Definition

Namespace: Numerics.NET.EquationSolvers
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.5
C#
public static bool TryFindZero(
	Func<double, double> function,
	double lowerBound,
	double upperBound,
	out double result,
	double tolerance = 1.49011611938477E-08,
	int maxIterations = 200,
	double rightHandSide = 0
)

Parameters

function  Func<Double, Double>
The function to find the zero for.
lowerBound  Double
The lower bound of the interval.
upperBound  Double
The upper bound of the interval.
result  Double
The result of the zero finding.
tolerance  Double  (Optional)
Optional. The tolerance for the zero finding. The default is SqrtEpsilon
maxIterations  Int32  (Optional)
Optional. The maximum number of iterations. The default is 200.
rightHandSide  Double  (Optional)
Optional. A value to subtract from the result of function. The default is 0.

Return Value

Boolean
True if the zero was found; otherwise, false.

See Also