* Bug 15058 fixed: gcd and lcm result could be puzzingly <0
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / discrete / lcm.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5  * Copyright (C) 2006-2008 - INRIA
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17
18 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
19           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
20           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
21           xml:lang="ja" xml:id="lcm">
22
23     <refnamediv>
24
25         <refname>lcm</refname>
26
27         <refpurpose>最小公倍数</refpurpose>
28
29     </refnamediv>
30
31     <refsynopsisdiv>
32
33         <title>呼び出し手順</title>
34
35         <synopsis>
36            pp = lcm(p)
37           [pp, fact] = lcm(p)
38         </synopsis>
39
40     </refsynopsisdiv>
41
42     <refsection>
43
44         <title>引数</title>
45
46         <variablelist>
47
48             <varlistentry>
49
50                 <term>p</term>
51
52                 <listitem>
53
54                     <para>
55
56                         多項式行ベクトル <literal>p = [p1, ..., pn]</literal> (2型) または
57
58                         整数行ベクトル (8型).
59
60                     </para>
61
62                 </listitem>
63
64             </varlistentry>
65
66             <varlistentry>
67
68                 <term>fact</term>
69
70                 <listitem>
71
72                     <para>多項式ベクトルまたは整数ベクトル</para>
73
74                 </listitem>
75
76             </varlistentry>
77
78             <varlistentry>
79
80                 <term>pp</term>
81
82                 <listitem>
83
84                     <para>多項式または整数</para>
85
86                 </listitem>
87
88             </varlistentry>
89
90         </variablelist>
91
92     </refsection>
93
94     <refsection>
95
96         <title>説明</title>
97
98         <para>
99
100             <code>pp = lcm(p)</code> は,多項式ベクトル<varname>p</varname>
101
102             の最小公倍数<varname>pp</varname>を計算します.
103
104         </para>
105
106         <para>
107
108             <code>[pp, fact] = lcm(p)</code> は,これに加えて以下のような
109
110             ベクトル<varname>fact</varname>を計算します <literal>p .* fact = pp * ones(p)</literal>
111         </para>
112         <para>
113           If <literal>p</literal> is a set of integers with some negative ones, the returned value
114           <literal>pp</literal> of their LCM is always positive.
115         </para>
116         <para>
117             If <literal>p</literal> is an array of decimal integers, they are priorly converted
118             into <literal>int32</literal> before processing.
119         </para>
120         <para>
121             実数の配列<literal>p</literal>の最小公倍数は,
122             <literal>lcm</literal>をコールする前に<code>p = inv_coeff(p, 0)</code>により
123             多項式に変換することにより得られます.
124         </para>
125
126     </refsection>
127
128     <refsection>
129
130         <title>例</title>
131
132         <programlisting role="example"><![CDATA[
133 //多項式の場合
134 s=poly(0,'s');
135 p=[s,s*(s+1)^2,s^2*(s+2)];
136 [pp,fact]=lcm(p);
137 p.*fact, pp
138 //整数の場合
139 V=int32([2^2*3^5, 2^3*3^2,2^2*3^4*5]);
140 lcm(V)
141  ]]></programlisting>
142
143     </refsection>
144
145     <refsection role="see also">
146
147         <title>参照</title>
148
149         <simplelist type="inline">
150
151             <member>
152
153                 <link linkend="gcd">gcd</link>
154
155             </member>
156
157             <member>
158
159                 <link linkend="bezout">bezout</link>
160
161             </member>
162
163         </simplelist>
164
165     </refsection>
166     <refsection role="history">
167         <title>履歴</title>
168         <revhistory>
169             <revision>
170                 <revnumber>6.0.1</revnumber>
171                 <revdescription>
172                    For input integers possibly negative, the returned LCM is now always positive.
173                 </revdescription>
174             </revision>
175         </revhistory>
176     </refsection>
177
178 </refentry>
179