_mode=POLY; _cpu=1; _language=en$ _modenum=NUMRATMP$ macro sekimat[p1,m,p2,n]{ private a,b,l,s,sekimat0,ii,j,q,tmp,f,g,h$ if (m>=n) then{ a=p1$ b=p2$ l=m$ s=n$ } else{ a=p2$ b=p1$ l=n$ s=m$ }$ dim sekimat0[1:l,1:l]$ for ii=0 to l-s-1 { for j=0 to s { sekimat0[ii+1,j+ii+1]=coef_ext(b,(x,j))$ }$ }$ b=x^(l-s)*b$ div(a,x^l,q,f)$ div(b,x^l,q,g)$ h=coef_ext(a,(x,l))*g-coef_ext(b,(x,l))*f$ for j=0 to l-1 { sekimat0[2*l-s-l+1,j+1]=coef_ext(h,(x,j))$ }$ for ii=l-1 to l-s+1 step(-1) { div(h,x^(l-1),q,tmp)$ h=x*tmp+coef_ext(a,(x,ii))*g-coef_ext(b,(x,ii))*f$ for j=0 to l-1 { sekimat0[2*l-s-ii+1,j+1]=coef_ext(h,(x,j))$ }$ }$ return(sekimat0)$ }$ p=x^9+x^8+a7*x^7+a6*x^6+a5*x^5+a4*x^4+a3*x^3+a2*x^2+a1*x+a0$ q=deriv(p,x)$ time_s; m9=%sekimat[p,9,q,8]$ w=det(m9,"minor")$ size(w); time_l;