bug 11079 fixed: tlist(['r','num','den','dt'] replaced by rlist
[scilab.git] / scilab / modules / overloading / macros / %p_j_s.sci
index b3baa12..12b0ab1 100644 (file)
@@ -17,10 +17,10 @@ if  or(imag(s)<>0)|or(int(s)<>s) then error('%p_j_s: integer power only'),end
 [ms,ns]=size(s)
 if ms==1&ns==1 then
   if s<0 then 
-    if or(abs(coeff(p(:)))*ones(maxi(degree(p))+1,1)==0) then
+    if or(abs(coeff(p(:)))*ones(max(degree(p))+1,1)==0) then
       error(27)
     end
-    f=tlist(['r','num','den','dt'],ones(p),p.^(-s),[])
+    f=rlist(ones(p),p.^(-s),[])
   else // this case is in fact hard coded
     f=p.^s
   end
@@ -33,7 +33,7 @@ elseif m==1&n==1 then // Element wise exponentiation p.^s with p "scalar"
   p=1/p
   num(kn)=p(2).^(-s(kn))
   den(kn)=p(3).^(-s(kn))
-  f=tlist(['r','num','den','dt'],num,den,[])
+  f=rlist(num,den,[])
 elseif ms==m&ns==n then  // Element wise exponentiation
   p=p(:);s=s(:);
   kp=find(s>=0)
@@ -41,12 +41,12 @@ elseif ms==m&ns==n then  // Element wise exponentiation
   num=p
   den=ones(s)
   num(kp)=num(kp).^s(kp)
-  if or(abs(coeff(p(kn)))*ones(maxi(degree(p(kn)))+1,1)==0) then
+  if or(abs(coeff(p(kn)))*ones(max(degree(p(kn)))+1,1)==0) then
     error(27)
   end
   num(kn)=ones(p(kn))
   den(kn)=p(kn).^(-s(kn))
-  f=tlist(['r','num','den','dt'],matrix(num,n,m),matrix(den,n,m),[])
+  f = rlist(matrix(num,n,m),matrix(den,n,m),[])
 else
   error(30)
 end