Better fix after https://codereview.scilab.org/#/c/14828/
[scilab.git] / scilab / modules / overloading / macros / %s_pow.sci
index 6dbc000..122d212 100644 (file)
@@ -63,7 +63,9 @@ function x=%s_pow(a,p)
             end
             x=u*diag(diag(s).^p)*inv(u);
         end
-        if real(p)==p&r then x=real(x),end
+        if int(p)==p & real(p)==p & r then
+            x=real(x);
+        end
     else
         error(43)
     end