1 #include "../qpms/gaunt.h"
8 #define MIN(x,y) (((x)>(y))?(y):(x))
10 static inline int Qmax(int m
, int n
, int mu
, int nu
) {
11 return MIN(n
, MIN(nu
, (n
+nu
+1-abs(-m
+mu
))/2));
14 int main(int argc
, char **argv
)
19 else lMax
= atoi(argv
[1]);
21 printf("// assuming lMax == %d:\n", lMax
);
22 size_t Bmaxcumsum
= 0;
23 printf("0x%zx,\n", Bmaxcumsum
);
24 for (int n
= 0; n
<= lMax
; n
++)
25 for (int m
= -n
; m
<= n
; m
++)
26 for (int nu
= 0; nu
<= lMax
; nu
++)
27 for (int mu
= -nu
; mu
<= nu
; mu
++) {
28 //FIXME toto je možná úplně blbě
29 assert(gaunt_q_max(-m
, n
+1, mu
, nu
) == Qmax(m
, n
, mu
, nu
);
30 Bmaxcumsum
+= gaunt_q_max(-m
, n
+1, mu
, nu
) + 1;
31 printf("0x%zx,\n", Bmaxcumsum
);