Former-commit-id: 64b1e7690c2761168b05c3b87f978e4c9f478deb
This commit is contained in:
Marek Nečada 2017-04-13 12:43:25 +03:00
parent 22dd5ef874
commit 261b6686bd
2 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,18 @@
#include <stdlib.h> #include "gaunt.h"
#ifdef USE_FORTRAN_GAUNT_XU
void __vec_trans_MOD_gaunt_xu(const double *m, const double *n, const double *mu, const double *nu, const int *qmax, double *v_aq, int *err);
void gaunt_xu(int m, int n, int mu, int nu, int qmax, double *v_aq, int *err) {
double mf = m, nf=n, muf=mu,nuf=nu;
__vec_trans_MOD_gaunt_xu(&mf,&nf,&muf,&nuf,&qmax,v_aq,err);
}
#else //!USE_FORTRAN_GAUNT_XU
//#include <stdlib.h>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#define ZERO_THRESHOLD 1.e-8 #define ZERO_THRESHOLD 1.e-8
#define BF_PREC 1.e-10 #define BF_PREC 1.e-10
// "Besides, the determined Real Programmer can write FORTRAN programs in any language." // "Besides, the determined Real Programmer can write FORTRAN programs in any language."
@ -1214,3 +1225,5 @@ int main()
return 0; return 0;
} }
#endif //GAUNTTEST #endif //GAUNTTEST
#endif //USE_FORTRAN_GAUNT_XU

View File

@ -4,7 +4,7 @@
#define _GAUNT_H_MIN(x,y) (((x) > (y)) ? (y) : (x)) #define _GAUNT_H_MIN(x,y) (((x) > (y)) ? (y) : (x))
static inline int gaunt_q_max(int m, int n, int mu, int nu) { static inline int gaunt_q_max(int m, int n, int mu, int nu) {
return _GAUNT_H_MIN(n, _GAUNT_H_MIN(nu, n+nu-abs(m+mu))); return _GAUNT_H_MIN(n, _GAUNT_H_MIN(nu, (n+nu-abs(m+mu))/2));
} }
#undef _GAUNT_H_MIN #undef _GAUNT_H_MIN