* Bug #14648 fixed - isinf(%inf+%i*%inf)) and isinf(%nan+%i%inf) returned %F
[scilab.git] / scilab / modules / elementary_functions / help / en_US / floating_point / isinf.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  * Copyright (C) 2016 - Samuel GOUGEON
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 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
18           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
19           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
20           xmlns:scilab="http://www.scilab.org" xml:id="isinf" xml:lang="en">
21     <refnamediv>
22         <refname>isinf</refname>
23         <refpurpose>tests for infinite elements</refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>Syntax</title>
27         <synopsis>
28             r = isinf(x)
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection>
32         <title>Arguments</title>
33         <variablelist>
34             <varlistentry>
35                 <term>x</term>
36                 <listitem>
37                     <para>matrix of real or complex numbers
38                     </para>
39                 </listitem>
40             </varlistentry>
41             <varlistentry>
42                 <term>r</term>
43                 <listitem>
44                     <para>
45                         matrix of booleans of the same size as <varname>x</varname>
46                     </para>
47                 </listitem>
48             </varlistentry>
49         </variablelist>
50     </refsection>
51     <refsection>
52         <title>Description</title>
53         <para>
54             <literal>isinf(x)</literal> returns the matrix <varname>r</varname>
55             of booleans such that, for each element <varname>x(i)</varname>,
56             <varname>r(i)</varname> is set to <literal>%T</literal> if and only if
57             <varname>x(i)</varname> is infinite.
58         </para>
59         <para>
60             When <literal>x</literal> is complex-encoded, <literal>x(i)</literal>
61             is considered infinite if its real part or its imaginary part (or both)
62             are infinite.
63         </para>
64     </refsection>
65     <refsection>
66         <title>Examples</title>
67         <programlisting role="example"><![CDATA[
68 [i, inf, nan] = (%i, %inf, %nan);
69 isinf([-1  0.01 -inf  inf  nan])
70 isinf([2+i, -10-inf, inf+i])
71 isinf([nan-i, inf-nan*i, nan+i*inf])
72  ]]></programlisting>
73     </refsection>
74     <refsection role="see also">
75         <title>See also</title>
76         <simplelist type="inline">
77             <member>
78                 <link linkend="isnan">isnan</link>
79             </member>
80             <member>
81                 <link linkend="isreal">isreal</link>
82             </member>
83             <member>
84                 <link linkend="isnum">isnum</link>
85             </member>
86             <member>
87                 <link linkend="type">type</link>
88             </member>
89         </simplelist>
90     </refsection>
91 </refentry>