Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Different answers with gaunt()

Why do the following bits of code give different outputs? (Note the use of Integer() for the second example):

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(l1, l2, l3, m1, m2, m3) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(02)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -0.5/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,0,1,1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,-1,1,1,1,0) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,-1,1,1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,1,1,-1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,-1,1,0) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,0,1,-1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)

and

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(Integer(l1), Integer(l2), Integer(l3), Integer(m1), Integer(m2), Integer(m3)) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(02)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)

Different answers with gaunt()

Why do the following bits of code give different outputs? (Note the use of Integer() for the second example):

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(l1, l2, l3, m1, m2, m3) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(02) range(0,2)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -0.5/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,0,1,1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,-1,1,1,1,0) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,-1,1,1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,1,1,-1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,-1,1,0) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,0,1,-1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)

and

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(Integer(l1), Integer(l2), Integer(l3), Integer(m1), Integer(m2), Integer(m3)) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(02) range(0,2)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)

Different answers with gaunt()

Why do the following bits of code give different outputs? (Note the use of Integer() for the second example):

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(l1, l2, l3, m1, m2, m3) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(0,2)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -0.5/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,0,1,1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,-1,1,1,1,0) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,-1,1,1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,1,1,-1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,-1,1,0) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,0,1,-1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)

and

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(Integer(l1), Integer(l2), Integer(l3), Integer(m1), Integer(m2), Integer(m3)) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(0,2)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)

Different answers with gaunt()

Why do the following bits of code give different outputs? (Note the use of Integer() for the second example):

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(l1, l2, l3, m1, m2, m3) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(0,2)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -0.5/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,0,1,1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,-1,1,1,1,0) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,-1,1,1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)
GC_table(1,0,1,1,1,-1) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,-1,1,0) = 0.488602511903_dp ! 1/2*sqrt(3)/sqrt(pi)
GC_table(1,1,1,0,1,-1) = -0.488602511903_dp ! -1/2*sqrt(3)/sqrt(pi)

and

from sage.functions.wigner import gaunt as gauntsage

for l1, l2, l3, m1, m2, m3 in [(Integer(l1), Integer(l2), Integer(l3), Integer(m1), Integer(m2), Integer(m3)) for l1 in range(0,2) for l2 in range(0,2) for l3 in range(0,2)     for m1 in range(-3,4) for m2 in range(-3,4) for m3 in range(-3,4)]:
  g = gauntsage(l1, l2, l3, m1, m2, m3)

  if abs(g) > 1e-12:
    print "    GC_table(%d,%d,%d,%d,%d,%d) = %.12f_dp ! %s" % (l1, m1, l2, m2, l3, m3, g, repr(g))

outputs

GC_table(0,0,0,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,-1,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(0,0,1,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(0,0,1,1,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,0,0,1,1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,0,0,1,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,0,0,1,-1) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,-1,1,1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)
GC_table(1,0,1,0,0,0) = 0.282094791774_dp ! 1/2/sqrt(pi)
GC_table(1,1,1,-1,0,0) = -0.282094791774_dp ! -1/2/sqrt(pi)