MathPHP\NumericalAnalysis\RootFinding\SecantMethodTest::testExceptionNegativeTolerance PHP Метод

testExceptionNegativeTolerance() публичный Метод

    public function testExceptionNegativeTolerance()
    {
        $func = function ($x) {
            return $x ** 4 + 8 * $x ** 3 - 13 * $x ** 2 - 92 * $x + 96;
        };
        $tol = -1.0E-5;
        $expected = 1;
        $p₀ = -1;
        $p₁ = 2;
        $this->setExpectedException('\\Exception');
        $x = SecantMethod::solve($func, $p₀, $p₁, $tol);
    }