-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, the function should be

static
int
triangle_selection_fails(int two_ja, int two_jb, int two_jc)
{
  return ((two_jb < abs(two_ja - two_jc)) || (two_jb > two_ja +
two_jc)) || GSL_IS_ODD(two_jb + two_ja + two_jc);
}

This should also solve the problem of 6j and 9j.

Btw, the the algorithm of evaluation of 3j, 6j, 9j in GSL is the worst
possible. It just follows the Racah formula and does not use any
symmetry properties. See [Tuzun et all, Comp Phys Comm, 1998] for 3j,
6j algorithms.

Håkan Johansson wrote:
> 
> In bzr trunk, the function triangle_selection_fails in 
> specfunc/coupling.c has grown a number of redundant tests since
> v1.15. It is enough to check the triangle condition for one spin vs
> the other two.  (See attached test program.)  Perhaps put a comment
> to keep the function lean?
> 
> Cheers, Håkan Johansson


- -- 
С уважением, Алексей Александрович Илларионов.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQEcBAEBAgAGBQJR3u2GAAoJEEBWYSFzoNKeRv4H/ROOBVQ4ZxvQXsi1C4Zgxd/G
6wyIckdDBNcG39fl/CUsZdvOkX05JV8YW84KoHsMAS+Mtl7qsGIFIqnoWBXBJ8yJ
D7zZIZw8rl9hEDSzMvlF+ZKUsUXZ8hDeqjAw2vHjrIq3LQjCGkfAuYwbU0DfIXny
UD+ZdVxLayhp8zNNrBsWReRXqjgD0w2fldjd/54ndnTDh5EILLbXKFwxui7mMHFr
GBpiYMKLWH9AibpPppYPs8Xp9j7YdcEN1f7WcdZ2Nu2rVIEI7Tsw9eu8/qib0322
GIysVJWb273MwohMF3dMZLLw6yLl+gDwvaOV4SkT6hJdzpXxlKU3uD6tOYLGRCM=
=eQC1
-----END PGP SIGNATURE-----

Reply via email to