Can anyone figure out how to fix this error? I want to define z beginning as 1 and update z to 2z everytime. Basically I was z = 1, 2, 4, 8, 16, ....
z := 1;
Successive := procedure(x1,y1,d);
procedure> F := Integers(9986899671513153299302129148204573775860428310315984346586760515456471532627966903385948703);
procedure> for i := 1 to d do
procedure|for> m := F!((3*x1^2)/(2*y1));
procedure|for> x2 := F!((m^2-2*x1));
procedure|for> y2 := F!((m*(x1-x2)-y1));
procedure|for> x1 := x2;
procedure|for> y1 := y2;
procedure|for> z := 2*z;
procedure|for> if z ge d then
procedure|for|if> break;
procedure|for|if> end if;
procedure|for> end for;
procedure> end procedure;
z := 2*z; ^ User error: Imported environment value 'z' cannot be used as a local
Magma does not allow undeclared side effects. No modifying global variables. Procedures explicitly declare which variables they change. See http://magma.maths.usyd.edu.au/magma/handbook/text/23
Here is the fix for the side effects:
Results in: