aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_sh/legendre_a.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mtx_sh/legendre_a.c')
-rw-r--r--src/mtx_sh/legendre_a.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mtx_sh/legendre_a.c b/src/mtx_sh/legendre_a.c
index 687cb41..d4e53f4 100644
--- a/src/mtx_sh/legendre_a.c
+++ b/src/mtx_sh/legendre_a.c
@@ -25,15 +25,8 @@ static void legendre_first_recurrence (double *sintheta, LegendreWorkSpace *wl)
// computes the legendre functions P_n^m(costheta) for m=n
// from P_0^0
for (n=1; n<=wl->nmax; n++) {
- if ((n%2)==1) {
- for (l=0,l0=0; l<wl->l; l++,l0+=incr) {
- wl->p[l0+n0+n] = -(2*n-1) * wl->p[l0+nmo0+n-1] * sintheta[l];
- }
- }
- else {
- for (l=0,l0=0; l<wl->l; l++,l0+=incr) {
- wl->p[l0+n0+n] = -(2*n-1) * wl->p[l0+nmo0+n-1];
- }
+ for (l=0,l0=0; l<wl->l; l++,l0+=incr) {
+ wl->p[l0+n0+n] = -(2*n-1) * wl->p[l0+nmo0+n-1] * sintheta[l];
}
nmo0=n0;
n0+=n+1;