My suggestion is: x=var('x') rf = RealField(prec=10) #10 bits g(x) = -rf(-0.1) * x^4 print g print g(1.2345)
but before try: preparse('g(x) = -0.1 * x^4') It seems that Sage always prints the full and correct representation of the RealNumber and not just an approximation. In this matter Sage is coerent. (but not always). Pedro On 14 Out, 19:41, Oscar Vargas <oscarva...@gmail.com> wrote: > Hi! > > I'm using SAGE in my Numerical Analysis course at Instituto > Tecnológico de Morelia, in Morelia, México. > > When I type: > > g(x) = -0.1*x**4 - 0.15*x**3 > show(g) > > the output is something like: > > x |--> -0.1000000000000000x^4 ..... > > Is there any way to show just a few decimals when using a SYMBOLIC > EXPRESSION? If g(x) was a little bit longer, then it'd be > uncomfortable to read the output... -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org