Reverse-mode autodiff with Enzyme involving WignerSymbols

>>> typeof(cg)

RationalRoots.RationalRoot{BigInt}

So this is a pretty memory flexiblly sized type which helps say meson calculations perfectly cancel where theres a symmetry. If you just want a float64 maybe look at the options here Timing Clebsch-Gordan-coefficients calls in Julia (beating c++ again) - #3 by misha_mikhasenko.

edit: or this one looks good and has specific float operations GitHub - 0382/CGcoefficient.jl: Compute CG coefficient, Racah coefficient, and Wigner 3j, 6j, 9j Symbols, and give the exact results.

1 Like