Cg fast.m

From Spinach Documentation Wiki
Jump to: navigation, search

Fast Clebsch-Gordan coefficient function with limited accuracy. Use clebsch_gordan.m for machine-precision results. Inputs:

     indices   -   CG coefficient indices, ordered
                   as follows: [L M L1 M1 L2 M2]
                               

Log-factorials are used to avoid numerical precision issues; the function works reliably to about L=100. If physically inadmissible indices are supplied, a zero is returned.