wignerSymbols
wignerSymbols copied to clipboard
Algorithm underflows when computing Wigner 3j symbols with large quantum numbers
When the quantum numbers become large, the relative sizes of the Wigner symbols can span tens of orders of magnitude. This frequently leads to overflow in the recurrence relations, which we deal with by dividing by a large number. However, this leads to underflows in the algorithm, resulting in the algorithm returning 0s instead of valid Wigner symbols. See
Wigner 3j symbol Mathematica WignerSymbols
[ 751 856 1200 464 -828 364] -9.41731061215e-58 -0.0
[ 841 379 1011 -631 313 318] -2.44096504011e-41 -0.0
[ 570 1007 1392 327 -933 606] -1.74376347733e-98 0.0
[ 970 727 1202 533 -663 130] -6.93009562166e-12 0.0
[ 905 919 1670 869 -594 -275] -3.48516309858e-195 -0.0
[ 895 574 1392 793 -365 -428] -1.41868655509e-146 -0.0
for examples of this.
The Fortran algorithm does not have this problem.
Hi Joey, Is this difference caused by different implementation in C++ and Fortran, or because somehow these languages handle floating point numbers differently? Presumably one could multiply a large number to deal with underflows very much the same way as you dealt with the overflow?
Thanks a lot! Jeff