<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 * Copyright (C) 2016 - Samuel GOUGEON
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<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="isinf" xml:lang="fr">
    <refnamediv>
        <refname>isinf</refname>
        <refpurpose>teste la présence de valeurs infinies</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntaxe</title>
        <synopsis>r = isinf(x)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Paramètres</title>
        <variablelist>
            <varlistentry>
                <term>x</term>
                <listitem>
                    <para>
                        matrice de nombres décimaux ou complexes, ou de polynômes à coefficients
                        réels ou complexes.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>r</term>
                <listitem>
                    <para>
                        matrice de booléens, de même taille que <varname>x</varname>
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Pour <literal>isinf(x)</literal> renvoie une matrice <literal>r</literal> dont chaque
            élément <literal>r(i)</literal> vaut <literal>%T</literal> (vrai) si et seulement si
            <literal>x(i)</literal> est infini.
        </para>
        <para>
            Pour <literal>x</literal> complexe, <literal>x(i)</literal> est considéré infini
            dés que sa partie réelle ou complexe ou les deux sont infinies.
        </para>
    </refsection>
    <refsection>
        <title>Exemples</title>
        <para>
            Avec des nombres réels ou complexes :
        </para>
        <programlisting role="example"><![CDATA[
[i, inf, nan] = (%i, %inf, %nan);
isinf([-1  0.01 -inf  inf  nan])
isinf([2+i, -10-inf, inf+i])
isinf([nan-i, nan+i*inf])
isinf(inf-nan*i)
 ]]></programlisting>
        <screen><![CDATA[
--> isinf([-1  0.01 -inf  inf  nan])
 ans  =
  F F T T F

--> isinf([2+i, -10-inf, inf+i])
 ans  =
  F T T

--> isinf([nan-i, nan+i*inf])
 ans  =
  F T

--> isinf(inf-nan*i)
 ans  =
  F
]]></screen>
        Note : <literal>%inf-%nan*%i</literal> est évalué comme
        <literal>%inf - %nan*complex(0,1) == %inf - complex(%nan*0, %nan*1) == %inf - complex(%nan, %nan)
            == complex(%inf-%nan, -%nan) == complex(%nan, %nan)
        </literal>
        , où Inf est effacé par Nan et n'apparait plus.
        <para/>
        <para>
            Avec des polynômes :
        </para>
        <programlisting role="example"><![CDATA[
p = poly([%nan -2 0 3],"x","coeff")
q = poly([0 %inf %i],"x","coeff")
r = poly([%nan %inf*%i 1],"x","coeff")
isinf([p q r])
 ]]></programlisting>
        <screen><![CDATA[
--> p = poly([%nan -2 0 3],"x","coeff")
 p  =
  Nan -2x +3x³

--> q = poly([0 %inf %i],"x","coeff")
 q  =
  Infx +ix²

--> r = poly([%nan %inf*%i 1],"x","coeff")
 r  =
  Nan -(Nan-Infi)x +x²

--> isinf([p q r])
 ans  =
  F T F
]]></screen>
    </refsection>
    <refsection role="see also">
        <title>Voir aussi</title>
        <simplelist type="inline">
            <member>
                <link linkend="percentinf">percentinf</link>
            </member>
            <member>
                <link linkend="isnan">isnan</link>
            </member>
            <member>
                <link linkend="isreal">isreal</link>
            </member>
            <member>
                <link linkend="isnum">isnum</link>
            </member>
            <member>
                <link linkend="type">type</link>
            </member>
        </simplelist>
        <refsection role="history">
            <title>Historique</title>
            <revhistory>
                <revision>
                    <revnumber>6.1.0</revnumber>
                    <revdescription>
                        Extension aux polynômes.
                    </revdescription>
                </revision>
            </revhistory>
        </refsection>
    </refsection>
</refentry>
