From dc60ea2554fae8af996126de1aa83f041f2aa3dd Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Thu, 19 Oct 2023 13:58:30 +0200 Subject: [PATCH] be more fussy when fixing the Wigner 3j signs --- src/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index aff2fb89..695d4316 100644 --- a/src/utils.c +++ b/src/utils.c @@ -368,8 +368,7 @@ int drc3jj(int il2,int il3,int im2, int im3,int *l1min_out, sumuni=sum1; cnorm=1./sqrt(sumuni); - if(thrcof[nfin-1]<0) sign1=-1; - else sign1=1; + sign1 = copysign(1., thrcof[nfin-1]); if(sign1*sign2<=0) cnorm=-cnorm;