MathPHP\NumericalAnalysis\RootFinding\SecantMethod::validate PHP 메소드

validate() 개인적인 정적인 메소드

Verify the input arguments are valid for correct use of the secant method If the tolerance is less than zero, an Exception will be thrown. If $p₀ = $p₁, then we cannot run our loop because the slope with be undefined, so we throw an Exception.
private static validate ( number $p₀, number $p₁, number $tol )
$p₀ number First initial approximation
$p₁ number Second initial approximation
$tol number Tolerance; How close to the actual solution we would like.
    private static function validate($p₀, $p₁, $tol)
    {
        Validation::tolerance($tol);
        Validation::interval($p₀, $p₁);
    }
SecantMethod