<?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) 2019 - 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="cotd" xml:lang="ja">
    <refnamediv>
        <refname>cotd</refname>
        <refpurpose>コタンジェント(余接,引数の単位:度)</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>y = cotd(x)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>引数</title>
        <variablelist>
            <varlistentry>
                <term>x</term>
                <listitem>
                    <para>実数配列.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>y</term>
                <listitem>
                    <para>
                        <varname>x</varname>と同じ次元の実数配列.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            <varname>y</varname>のエントリは,<varname>x</varname>
            (単位は度と仮定)
            の対応するエントリのコタンジェント,
            <code>t=cos(x)./sin(x)</code>となります.
            整数<literal>n</literal>について<literal>n*180</literal>
            に等しいエントリは無限大となります.
            一方,<constant>%pi</constant>を正確に表現できないため,
            <code>cotg(n*%pi)</code>は大きいですが有限となります.
            エントリが整数で奇数の<literal>n</literal>について
            <literal>n*90</literal>に
            等しい場合,結果は厳密に<literal>0</literal>となります.
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
cotd([30 45 60 90])
cotd([-180 -90 0 90 180])
 ]]></programlisting>
    <screen><![CDATA[
--> cotd([30 45 60 90])
 ans  =
   1.7320508   1.   0.5773503   0.

--> cotd([-180 -90 0 90 180])
 ans  =
   Inf   0.   Inf   0.   Inf
]]></screen>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="cotg">cotg</link>
            </member>
            <member>
                <link linkend="coth">coth</link>
            </member>
            <member>
                <link linkend="tan">tan</link>
            </member>
            <member>
                <link linkend="tand">tand</link>
            </member>
        </simplelist>
    </refsection>
</refentry>