MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / BisectionMethod.test.js

File BisectionMethod.test.js

Maths/test/BisectionMethod.test.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { findRoot } from '../BisectionMethod'
2
3test('Equation f(x) = x^2 - 3*x + 2 = 0, has root x = 1 in [a, b] = [0, 1.5]', () => {
4 const root = findRoot(0, 1.5, (x) => x ** 2 - 3 * x + 2, 8)

Callers

nothing calls this directly

Calls 2

findRootFunction · 0.90
logMethod · 0.45

Tested by

no test coverage detected