Ask Your Question

Grover's profile - activity

2018-03-13 12:07:10 +0200 received badge  Famous Question (source)
2015-01-01 19:45:22 +0200 received badge  Notable Question (source)
2013-01-21 01:04:25 +0200 received badge  Popular Question (source)
2011-04-29 03:57:35 +0200 marked best answer Numerical approximation for expression coefficients

If $x$ is to be treated as a polynomial, then the following might suit your needs:

sage: var('y z')
(y, z)
sage: x = 4/5*(4*y - 3)*z - 1/3
sage: x.polynomial(RR)
3.20000000000000*y*z - 2.40000000000000*z - 0.333333333333333

Try

sage: RR?

for more information about RR

2011-04-29 03:57:35 +0200 received badge  Scholar (source)
2011-04-28 07:38:22 +0200 asked a question Numerical approximation for expression coefficients

I currently have an equation that looks like

x = 4/5(4y - 3)*z - 1/3

How can I get Sage to convert the coefficients to numerical approximations? I want to end up with something like

x = 0.8(4y - 3)*z - 0.333333333

I tried x.n(), but that only gives a "cannot evaluate symbolic expression numerically" error. Also x*1.0 doesn't do anything.