On 4/19/12 8:24 AM, Graham Gerrard wrote:
z="1/2*x" x=3 eval(z) 0 z="x*1/2" eval(z) 3/2
The problem is that you are using eval, but should be using sage_eval. eval is a python command that uses python integers, rather than Sage integers and rationals.
sage: eval("1/2") 0 sage: sage_eval("1/2") 1/2 Thanks, Jason -- 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