bisect
bisect(
func,start,end,maxIterations,errorTolerance):number
Defined in: src/bisect.js:20
Bisection method is a root-finding method that repeatedly bisects an interval to find the root.
This function returns a numerical approximation to the exact value.
Parameters
Section titled “Parameters”Function
input function
number
start of interval
number
end of interval
maxIterations
Section titled “maxIterations”number
the maximum number of iterations
errorTolerance
Section titled “errorTolerance”number
the error tolerance
Returns
Section titled “Returns”number
estimated root value
Throws
Section titled “Throws”Argument func must be a function
Example
Section titled “Example”bisect(Math.cos,0,4,100,0.003); // => 1.572265625