Better fix after https://codereview.scilab.org/#/c/14828/ 52/14852/2
Vincent COUVERT [Fri, 11 Jul 2014 09:42:27 +0000 (11:42 +0200)]
These tests were broken by the fix:
test_run core scal_vect_mat
test_run elementary_functions sqrtm

Change-Id: I21d0075405693a5f684e16d7afc201e1639ab1b5

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