2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-13 12:32:15 +00:00

Zeros of Legendre polynomials. This uses a root bracketing given by Szego with an asymptotic by Tricomi to get a domain and an initial guess for the root, then refines it via Newton's method.

This commit is contained in:
Nick Thompson
2017-04-14 15:51:39 -05:00
parent 21bcf34a51
commit 4110a69416
5 changed files with 227 additions and 1 deletions

View File

@@ -222,4 +222,13 @@ BOOST_AUTO_TEST_CASE( test_main )
test_legendre_p_prime<float>();
test_legendre_p_prime<double>();
test_legendre_p_prime<long double>();
int distance = test_legendre_p_zeros_double_ulp(1, 107);
BOOST_CHECK(distance <= 1);
// This test is very expensive; the total runtime grows cubically with n.
//distance = test_legendre_p_zeros_double_ulp(108, 350);
//BOOST_CHECK(distance <= 2);
test_legendre_p_zeros<float>();
test_legendre_p_zeros<double>();
test_legendre_p_zeros<long double>();
}