Dekker Brent Solver.Find Zero Method
Finds a zero of a function starting from an initial guess.
Definition
Namespace: Numerics.NET.EquationSolvers
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
The best approximation to a zero of function.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
public static double FindZero(
Func<double, double> function,
double lowerBound,
double upperBound,
double tolerance = 1.49011611938477E-08,
int maxIterations = 200,
double rightHandSide = 0
)Parameters
- function Func<Double, Double>
- A function of one variable that specifies the function on the left-hand side of the equation.
- lowerBound Double
- The lower bound of the interval that contains the root.
- upperBound Double
- The upper bound of the interval that contains the root.
- tolerance Double (Optional)
- maxIterations Int32 (Optional)
- rightHandSide Double (Optional)
Return Value
DoubleThe best approximation to a zero of function.
Remarks
Use this method when you have very little information about the location of the zero.
Exceptions
| Convergence | The algorithm failed to converge to a solution. |