1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17 xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
18 xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
19 xml:lang="ru" xml:id="lcm">
21 <refname>lcm</refname>
22 <refpurpose>наименьшее общее кратное (НОК)</refpurpose>
25 <title>Синтаксис</title>
32 <title>Аргументы</title>
38 вектор-строка полиномиальных значений <literal>p = [p1, ..., pn]</literal> либо
39 вектор-строка целочисленных значений (тип 8).
47 вектор полиномиальных или целочисленных значений (тип 8).
54 <para>полином или целое число.</para>
60 <title>Описание</title>
62 <code>pp=lcm(p)</code> вычисляет наименьшее общее кратное <varname>pp</varname> вектора
63 полиномиальных значений <varname>p</varname>.
66 <code>[pp, fact]=lcm(p)</code> вычисляет дополнительно вектор <varname>fact</varname>
67 такой, что <literal>p .* fact = pp * ones(p)</literal>.
70 If <literal>p</literal> is a set of integers with some negative ones, the returned value
71 <literal>pp</literal> of their LCM is always positive.
74 If <literal>p</literal> is an array of decimal integers, they are priorly converted
75 into <literal>int32</literal> before processing.
79 <title>Примеры</title>
80 <programlisting role="example"><![CDATA[
83 p=[s,s*(s+1)^2,s^2*(s+2)];
88 V=int32([2^2*3^5, 2^3*3^2,2^2*3^4*5]);
92 <refsection role="see also">
93 <title>Смотрите также</title>
94 <simplelist type="inline">
96 <link linkend="gcd">gcd</link>
99 <link linkend="bezout">bezout</link>
103 <refsection role="history">
104 <title>История</title>
107 <revnumber>6.0.1</revnumber>
109 For input integers possibly negative, the returned LCM is now always positive.