From b99e7b55e7293e58f2475cbea4c7e0a689222a67 Mon Sep 17 00:00:00 2001 From: moritzleucke Date: Wed, 6 Nov 2024 14:26:30 +0100 Subject: [PATCH] correct error in legendre polinomial evaluation --- GX-NAOIntegrals/src/legendre_polynomial.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GX-NAOIntegrals/src/legendre_polynomial.f90 b/GX-NAOIntegrals/src/legendre_polynomial.f90 index 0c6950c..346f12b 100644 --- a/GX-NAOIntegrals/src/legendre_polynomial.f90 +++ b/GX-NAOIntegrals/src/legendre_polynomial.f90 @@ -35,7 +35,7 @@ subroutine evaluate_legendre_polinomial(n, x, p) p(1) = 1.0_dp p(2) = x do i = 2, n - p(i+1) = (2.0_dp*n-1.0_dp)/dble(n) * x * p(i) - (n-1.0_dp)/dble(n) * p(i-1) + p(i+1) = (2.0_dp*i-1.0_dp)/dble(i) * x * p(i) - (i-1.0_dp)/dble(i) * p(i-1) end do end subroutine evaluate_legendre_polinomial @@ -67,7 +67,7 @@ subroutine evaluate_legendre_polinomial_batch(n, n_points, x, p) p(:, 1) = 1.0_dp p(:, 2) = x(:) do i = 2, n - p(:, i+1) = (2.0_dp*n-1.0_dp)/dble(n) * x(:) * p(:, i) - (n-1.0_dp)/dble(n) * p(:, i-1) + p(:, i+1) = (2.0_dp*i-1.0_dp)/dble(i) * x(:) * p(:, i) - (i-1.0_dp)/dble(i) * p(:, i-1) end do end subroutine evaluate_legendre_polinomial_batch