Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

getting a float result from solve

I am trying to solve a system of 2eqs, and sage keeps giving me integer results. image description When I try to print a.n() I get an error cannot evaluate symbolic expression numerically.

getting a float result from solve

I am trying to solve a system of 2eqs, and sage keeps giving me integer results. image description When I try to print a.n() I get an error cannot evaluate symbolic expression numerically.

Sorry, I tried to attach an image of it and I messed it up. Here is the code:

a,b=var('a b')
solve([7.0==a*sqrt(16)/(1+b/16.0),22==a*sqrt(4)/(1+b/4)],a,b)
print a.n()

The result the solve command gives is the ratios of integers.

(I typed an asterisk between the a and the sqrt, but it doesn't show up...)