SAGE digits!!!
How can I make p.real_roots() in 6 digits??
.n(digits=6) DONT work!!!
How can I make p.real_roots() in 6 digits??
.n(digits=6) DONT work!!!
R.<x> = RealField(100)[];
a = [];
for n in range (1,11):
p = gen_legendre_P(n, 0, x)
print "n =", n
print "Nultocke: ", [p.real_roots()[i].n(digits=6) for i in range(len(p.real_roots()))]
a = p.real_roots();
If you like @chicago's answer, you can "Accept" it, and he/she gets more karma/reputation.
And you get 2 for it as well :-)
Asked: 14 years ago
Seen: 989 times
Last updated: Apr 06 '11