Displaying 1 result from an estimated 1 matches for "cp0ewjopn".
2011 Sep 14
1
ruby to solve a physics question
I am trying to solve one of my graduate level physics problems with
ruby...
Here is what I have so far...
a6=0.0
for n1 in -10..10
for n2 in -10..10
for n3 in -10..10
if n1!=0 and n2!=0 and n3!=0
p=Math.sqrt(n1**2+n2**2+n3**2+n1*n2/1.414+n1*n3/1.41+n2*n3/1.414)
a6+=(1/p)**6
end
end
end
end
puts a6
What I''ve got here is a 10x10x10 face-centered