# SAGE digits!!!

How can I make p.real_roots() in 6 digits??

.n(digits=6) DONT work!!!

SAGE digits!!!

How can I make p.real_roots() in 6 digits??

.n(digits=6) DONT work!!!

add a comment

3

```
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();
```

Asked: **
2011-04-05 05:29:16 -0600
**

Seen: **661 times**

Last updated: **Apr 06 '11**

obtaining all numerical roots of a function in an interval

Inaccurate numerical result for roots of square equation

Finding all the roots at once numerically

Numerically find all roots in an interval

I need help with Sagetex/Sage (normal form&data file useage)

Using solve() to find positive real solutions to a complex equation

Syntax for numerically solve differential equation

Question abour numerical coercions

Installing Visualization Tools on Linux and Tkinter

How to check if a symbolic expression is numerically evaluable?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.