0b7c22dd14829768d1e439d9dbf8884b351b6686
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / discrete / rat.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) 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" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="rat" xml:lang="ja">
19
20     <refnamediv>
21
22         <refname>rat</refname>
23
24         <refpurpose>浮動小数点数の有理数近似</refpurpose>
25
26     </refnamediv>
27
28     <refsynopsisdiv>
29
30         <title>呼び出し手順</title>
31
32         <synopsis>[N,D]=rat(X [,tol])
33
34             Y=rat(X [,tol])
35
36         </synopsis>
37
38     </refsynopsisdiv>
39
40     <refsection>
41
42         <title>引数</title>
43
44         <variablelist>
45
46             <varlistentry>
47
48                 <term>X</term>
49
50                 <listitem>
51
52                     <para>実数のベクトルまたは行列</para>
53
54                 </listitem>
55
56             </varlistentry>
57
58             <varlistentry>
59
60                 <term>tol</term>
61
62                 <listitem>
63
64                     <para>正の実数スカラー, 許容誤差 (下記参照). デフォルト値は1d-6.</para>
65
66                 </listitem>
67
68             </varlistentry>
69
70             <varlistentry>
71
72                 <term>N</term>
73
74                 <listitem>
75
76                     <para>整数のベクトルまたは行列</para>
77
78                 </listitem>
79
80             </varlistentry>
81
82             <varlistentry>
83
84                 <term>D</term>
85
86                 <listitem>
87
88                     <para>整数のベクトルまたは行列</para>
89
90                 </listitem>
91
92             </varlistentry>
93
94             <varlistentry>
95
96                 <term>Y</term>
97
98                 <listitem>
99
100                     <para>実数のベクトルまたは行列</para>
101
102                 </listitem>
103
104             </varlistentry>
105
106         </variablelist>
107
108     </refsection>
109
110     <refsection>
111
112         <title>説明</title>
113
114         <para>
115
116             <literal>[N,D] = rat(X,tol)</literal> は,
117
118             <literal>abs(N./D - X) &lt;= tol*norm(X,1)*abs(X)</literal>の基準で
119
120             <literal>N./D</literal>が<literal>X</literal>に近くなるような
121
122             2つの整数行列を返します.
123
124         </para>
125
126         <para>
127
128             <literal>y=rat(x,tol)</literal> は商
129
130             <literal>N./D</literal>を返します.
131
132         </para>
133
134         <para>
135
136             有理数近似は分数展開を丸めることにより生成されます.
137
138         </para>
139
140     </refsection>
141
142     <refsection>
143
144         <title>例</title>
145
146         <programlisting role="example"><![CDATA[
147 [n,d]=rat([3.5, 1.333333,-0.8])
148 [n,d]=rat(%pi)
149 [n,d]=rat(%pi,1.d-12)
150 n/d-%pi
151  ]]></programlisting>
152
153     </refsection>
154
155     <refsection role="see also">
156
157         <title>参照</title>
158
159         <simplelist type="inline">
160
161             <member>
162
163                 <link linkend="int">int</link>
164
165             </member>
166
167             <member>
168
169                 <link linkend="round">round</link>
170
171             </member>
172
173         </simplelist>
174
175     </refsection>
176
177 </refentry>
178