Skip to content

Instantly share code, notes, and snippets.

@certik
Created August 30, 2012 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save certik/3523473 to your computer and use it in GitHub Desktop.
Save certik/3523473 to your computer and use it in GitHub Desktop.
from math import sqrt
c=137.03599907
omega = 1.
l = 0
# l = j - 1/2:
j = l + 0.5
for n in range(1, 6):
print sqrt(omega * (2*(n-j)+1) * c**2 + c**4) - c**2
print
# l = j + 1/2:
j = l - 0.5
for n in range(1, 6):
print sqrt(omega * (2*(n+j)+3) * c**2 + c**4) - c**2
0.999973375743
1.99989350863
2.99976040718
3.99957407988
4.99933453524
1.99989350863
2.99976040718
3.99957407988
4.99933453524
5.99904178175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment