区間における 1 変数関数の根を、Brent の zeroin 法で求めます。R の uniroot() と同等です。
uniroot()
uniroot((x) => x * x - 2, 0, 2, { tol: 1e-12 }).root; // 1.4142135623731364 コピー
uniroot((x) => x * x - 2, 0, 2, { tol: 1e-12 }).root; // 1.4142135623731364
区間における 1 変数関数の根を、Brent の zeroin 法で求めます。R の
uniroot()と同等です。