/* cloitrem */ define t(x,m){ auto f f=int((m+1)*x,m) g=f%2 if(g==0){ return(f/2) }else{ return((3*f+1)/2) } } /* This determines the matrix Q(d) for the d-branched mapping F_m. Here d=2m or ma, according as m is even or odd. */ define matrixq(m){ auto i,j,mm[],d,g,r if(m%2==0){ d=2*m }else{ d=m } for(i=0;i0){ print "T(x)=(",a,"x+",b,")/",s,"=int(",a,"x/",s,")+",c,"\n" } if(b<0){ print "T(x)=(",a,"x",b,")/",s,"=int(",a,"x/",s,")+",c,"\n" } } } /* traj(x,m,n) prints the first n iterates of x under t(x,m) */ define traj(x,m,n){ auto i for(i=0;i