Re: [sage-support] converting expression with real coefficient to rational coefficient

2011-03-17 Thread tvn
great -- thanks -- wasn't aware of such function. -- 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 U

Re: [sage-support] converting expression with real coefficient to rational coefficient

2011-03-17 Thread Laurent
sage: R = PolynomialRing(QQ,[x,y]) result = R(0.5*x + 0.7*y); result; type(result) 1/2*x + 7/10*y Does it help ? sage: s=symbolic_expression(result) sage: type(s) Laurent -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to s

[sage-support] converting expression with real coefficient to rational coefficient

2011-03-17 Thread tvn
I am trying to convert something like.5*x + 0.7*y of type Expression tosomething like 1/2*x + 7/10*y of type Expression so far I am able to do sage: R = PolynomialRing(QQ,[x,y]) result = R(0.5*x + 0.7*y); result; type(result) 1/2*x + 7/10*y however the 'type' of the result is