correct value is -1.748 according to wikipedia
general
Phi Kappa Chi ΦΚΧ <a:yeah:589703000977571860><a:ppHop:536353159615086612>
Jump to date
Friday, September 22, 2017
that is with L = 15, so it is working kind of
Just need to get it to only print the last value
permutations
order matters
it is a point in 3d space
yeah, if I can just get this thing to print the last calculated sum, I am good
Saturday, September 23, 2017
Fucking liar
Fucking
no shit
A month late
lol
being bilingual is required though
is it, for english speakers?
for being an elected official
It is required that we teach french in schools and Quebec teaches english in theirs though
i wholesomely enjoy Justin Trudeau
I do not
fuck that guy
and everything about him
Haha my dudes I did it
you ended it all?
nice.
Got it to work
yeah
I did not specify as 1.0 at first
forgot to take that out
doesn't python 3 need things casted
and sure
alright
lol
Already excited
from math import sqrt
import numpy as np
import matplotlib.pyplot as plt
def centeredgen(L):
for i in range(L+1):
for j in range(L+1):
for k in range(L+1):
yield i,j,k
if k > 0:
yield i,j,-k
if j > 0:
yield i,-j,k
if k > 0:
yield i,-j,-k
if i > 0:
yield -i,j,k
if k > 0:
yield -i,j,-k
if j > 0:
yield -i,-j,k
if k > 0:
yield -i,-j,-k
if __name__ == "__main__":
L = 30
M = 0.0
a = []
gen = centeredgen(L)
next(gen) # skip the 0,0,0
sign2 = lambda n: " " if n >= 0 else ""
sign = lambda n: " "*(3-len(str(n)))
for i,j,k in gen:
h = ((-1.0)**(i+j+k))/sqrt(i*i+j*j+k*k)
M += h
a += [M]
print("%s%d,%s%d,%s%d -> %s%01.4f => %s%01.4f"%(sign(i),i,sign(j),j,sign(k),k,sign2(h),h,sign2(M),M))
print("\nMean estimate: %.4f" % np.mean(a))
plt.plot(a)
plt.show()
lol
rip me
I used 2.7 to do this, I have no fucking idea what the course wants
he told us we were using 3, but told us to download 2.7
what is the difference?
will keep that in mind for next time. After spending 10 hours on this, I am fine with it as is
having wrote and rewrote it from the ground up 3 times
How many times did your thing run it?
ah, thats why
it is much more accurate than mine for L=30 lol
but thats fine with me
good banner
Kappa
It is pretty good
Haha my dude
Kappa
Put all your points in bartering
you should put it all in telekinesis tbh
probably the most useless skill
Sunday, September 24, 2017
Fire buy me the FEW dlc
Kappa
Monday, September 25, 2017
Original Pokemon Theme Sung in Japanese
Translation and Coaching By Yukiko Sumi Big Thanks to all the fans who came out JULY 4th to LA's Anime EXPO. http://www.anime-expo.org/guests/jason-paige/ To...
youtu.be