public static solve ( callable $function, number $a, number $b, number $p, number $tol ) : number | ||
$function | callable | g(x) callback function, obtained by rewriting f(x) = 0 as g(x) = x |
$a | number | The start of the interval which contains a root |
$b | number | The end of the interval which contains a root |
$p | number | The initial guess of our root, in [$a, $b] |
$tol | number | Tolerance; How close to the actual solution we would like. |
Результат | number |