BisectionTryFindRoot Method |
Find a solution of the equation f(x)=0.
Namespace: Altaxo.Calc.RootFindingAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static bool TryFindRoot(
Func<double, double> f,
double lowerBound,
double upperBound,
double accuracy,
int maxIterations,
out double root
)
Parameters
- f FuncDouble, Double
- The function to find roots from.
- lowerBound Double
- The low value of the range where the root is supposed to be.
- upperBound Double
- The high value of the range where the root is supposed to be.
- accuracy Double
- Desired accuracy for both the root and the function value at the root. The root will be refined until the accuracy or the maximum number of iterations is reached. Must be greater than 0.
- maxIterations Int32
- Maximum number of iterations. Usually 100.
- root Double
- The root that was found, if any. Undefined if the function returns false.
Return Value
BooleanTrue if a root with the specified accuracy was found, else false.
See Also