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

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

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