On 11/15/10 3:51 AM, [email protected] wrote:
Dear support

I want to enter long number into sage notebook (300 decimal paces)

The minimal example is

sage: x=1234\
sage: 56789
Traceback (most recent call last):
...
SyntaxError: invalid syntax



That doesn't work in the normal python interpreter loop or the ipython interpreter loop. You could use something like what you did next with strings:

sage: x=Integer('12345'\
....: '67890')
sage: x
1234567890

or

sage: x=Integer('12345\
67890')
sage: x
1234567890




Is there any way to write a number on more than one line? I tried
also

x=eval('0.13546543513\
35216544435213132\
354351321321321')

but the precision is lost.

Try:

sage: x=RealNumber('0.13546543513\
35216544435213132\
354351321321321')
sage: x
0.135465435133521654443521313235435132132132


Thanks,

Jason

--
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

Reply via email to