# numerical_approx() from sympy.solvers import solve

from sympy import Symbol

x = Symbol('x')

C=solve((x+86)/x-95/58,x)

How its possible to use numerical_approx() on this https://ask.sagemath.org/question/992... this solutions is not working,

C.numerical_approx()

numerical_approx(C)

also not

edit retag close merge delete

To display blocks of code or error messages, skip a line above and below, and do one of the following (all give the same result):

• indent all code lines with 4 spaces
• select all code lines and click the "code" button (the icon with '101 010')
• select all code lines and hit ctrl-K

For instance, typing

If we define f by

def f(x, y, z):
return x * y * z

then f(2, 3, 5) returns 30 but f(2*3*5) gives:

TypeError: f() takes exactly 3 arguments (1 given)


produces:

If we define f by

def f(x, y, z):
return x * y * z


then f(2, 3, 5) returns 30 but f(2*3*5) gives:

TypeError: f() takes exactly 3 arguments (1 given)


Sort by » oldest newest most voted Sage's and SymPy's expressions and numbers have different types, but you can convert between them as explained in A Sample Session using SymPy.

sage: C._sage_().numerical_approx()
134.810810810811
sage: numerical_approx(C._sage_())
134.810810810811

more