First input argument of modulo can also be a polynomial. 88/10688/2
Vincent COUVERT [Tue, 5 Mar 2013 07:51:45 +0000 (08:51 +0100)]
To test: test_run("polynomials", "bug_201")

Change-Id: If7bca785c6b63d76733c4455da85853f99083049

scilab/modules/elementary_functions/help/en_US/modulo.xml
scilab/modules/elementary_functions/help/fr_FR/modulo.xml
scilab/modules/elementary_functions/macros/modulo.sci

index 589f723..b6d7298 100644 (file)
@@ -30,7 +30,7 @@
             <varlistentry>
                 <term>n</term>
                 <listitem>
-                    <para>real vector or matrix </para>
+                    <para>real or polynomial vector or matrix </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
index 1ef05da..bc42662 100644 (file)
@@ -19,7 +19,7 @@
             <varlistentry>
                 <term>n</term>
                 <listitem>
-                    <para>entier</para>
+                    <para>vecteur ou matrice de rééls ou de polynômes</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
index 53298e6..099cab8 100644 (file)
@@ -17,7 +17,7 @@ function i = modulo(n, m)
         error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),"modulo", 2));\r
     end\r
 \r
-    if typeof(n) <> "constant" | ~isreal(n) then\r
+    if and(typeof(n) <> ["constant", "polynomial"]) | ~isreal(n) then\r
         error(msprintf(gettext("%s: Wrong type for input argument #%d: A real expected.\n"), "modulo", 1));\r
     end\r
 \r