Skip to content

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.

Function

input function

number

start of interval

number

end of interval

number

the maximum number of iterations

number

the error tolerance

number

estimated root value

Argument func must be a function

bisect(Math.cos,0,4,100,0.003); // => 1.572265625