Calculate $\mathbf{K}(z)$ matrices

$$ K(z) = K_2 b(z)^2 +K_1 b(z) + K_0 $$

Definitions and declarations

Racah W-coefficient

calculate W(j1,j2,J,j3,J12,J23,jtestmin='False'))

if j3 is a rational number

use the builtin racah() function

else

use the algebraic algorithm
return an algebraic expression
test the algebraic expression:

   if jtestmin is a rational number  
       substitute in the algebraic expression for W  
            jR = jtestmin, jtestmin+1/2, ... 11/2  
        and compare to racah()  

Construct the matrices K_2, K_1, K_0

N, J12list, J23list, jL, jtestmin global variables

$\mathbf{ode}$ $\mathbf{2}$

$\mathbf{ode}$ $\mathbf{3}_j$

$\mathbf{ode}$ $\mathbf{2}_j$

$\mathbf{ode}$ $\mathbf{1}_j$