When |Ra| is small enough and mp-m is large enough, or when |Rb| is small enough and -mp-m is large enough, the power appearing in the prefactor can overflow, leaving us with nans. These values should cancel with other values coming from the rho_min value in the polynomial, to leave us with very small values. Thus, I should be able to deal with them properly and get finite results.
This problem appears, for example, when one of the components of the rotor is ~1e-10 and ell>15, though it will also appear at lower ell values for smaller components.
I think that incorporating the powers of |Ra| and |Rb| into the computation of Prefactor should deal with this nicely. However, it may require decomposing them into abs and angle parts.
When
|Ra|
is small enough andmp-m
is large enough, or when|Rb|
is small enough and-mp-m
is large enough, the power appearing in the prefactor can overflow, leaving us withnan
s. These values should cancel with other values coming from the rho_min value in the polynomial, to leave us with very small values. Thus, I should be able to deal with them properly and get finite results.This problem appears, for example, when one of the components of the rotor is ~1e-10 and
ell>15
, though it will also appear at lowerell
values for smaller components.I've written a test to detect this behavior in
test_WignerD_overflow
.I think that incorporating the powers of
|Ra|
and|Rb|
into the computation ofPrefactor
should deal with this nicely. However, it may require decomposing them intoabs
andangle
parts.