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