Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

click to hide/show revision 2
retagged

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.

click to hide/show revision 3
retagged

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.

click to hide/show revision 4
retagged

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.