Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

looping newline

I am running Sage 5.1 under Windows 7 using the Virtual Box image.

When I enter a gp program with a newline it goes into a loop.

This works: %gp lucas(p) ={my(u,q); u=4; q=1<

But this does not: %gp lucas(p) ={ my(u,q); u=4; q=1<

Can you tell me what I need to do so that I can enter a program on multiple lines?

click to hide/show revision 2
No.2 Revision

looping newline

I am running Sage 5.1 under Windows 7 using the Virtual Box image.

When I enter a gp program with a newline it goes into a loop.

This works: works:

%gp
lucas(p) ={my(u,q); u=4; q=1<

q=1<<p - 1;for(k=3,p, u = (sqr(u)-2) % q);u == 0;} lucas(5)

But this does not: not:

%gp
lucas(p) ={
my(u,q); 
u=4;
q=1<

q=1<<p - 1; for(k=3,p, u = (sqr(u)-2) % q); u == 0; } lucas(5)

Can you tell me what I need to do so that I can enter a program on multiple lines?