sage: str(0.53253453425).rstrip(".0")
'0.53253453425'
sage: str(2).rstrip(".0")
'2'On 22 July 2010 22:26, tvn <[email protected]> wrote: > is there a trick to convert RealLiteral numbers to strings without > the trailing zeros? e.g., 2.000000000000 and 0.55550500000 become 2 > and 0.555505 respectively -- > > -- > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: [email protected] -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
