Note: N(foo), foo.n() and foo.evalf() are all equivalent -- no need to do
both. To do what you requested (for now) just nsimplify the expression to
convert decimals to rationals:
>>> [w.n(4) for w in solve(nsimplify('x**5 + x**3 + 1.5', rational=True),
'x')]
[-0.9300, -0.2544 - 1.226*I, -0.2544 + 1.226*I, 0.7194 - 0.7145*I, 0.7194 +
0.71
45*I]
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.