* Bug 16026 fixed: atanh() page and m2sci updated
[scilab.git] / scilab / modules / elementary_functions / help / en_US / trigonometry / atanh.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) 2012 - 2016 - Scilab Enterprises
6  * Copyright (C) 2019 - Samuel GOUGEON
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19           xmlns:scilab="http://www.scilab.org"  xml:id="atanh" xml:lang="en">
20     <refnamediv>
21         <refname>atanh</refname>
22         <refpurpose>hyperbolic tangent inverse</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Syntax</title>
26         <synopsis>t = atanh(x)</synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Arguments</title>
30         <variablelist>
31             <varlistentry>
32                 <term>x, t</term>
33                 <listitem>
34                     <para>Arrays of real or complex numbers, of same sizes.</para>
35                 </listitem>
36             </varlistentry>
37         </variablelist>
38     </refsection>
39     <refsection>
40         <title>Description</title>
41         <para>
42             The components of vector <varname>t</varname> are the hyperbolic tangent inverse of
43             the corresponding entries of vector <varname>x</varname>.
44             The result <varname>t</varname> is real for <varname>x</varname> in
45             <literal>[-1,1]</literal>, and complex otherwise.
46         </para>
47     </refsection>
48     <refsection>
49         <title>Examples</title>
50         <para>
51             With input real numbers:
52         </para>
53         <programlisting role="example"><![CDATA[
54 x = [-%inf -2 -1 -0.5 0 0.5 1 2 3 %inf];
55 [x ; atanh(tanh(x))]
56 atanh(x')
57  ]]></programlisting>
58     <screen><![CDATA[
59 --> [x ; atanh(tanh(x))]
60  ans  =
61   -Inf  -2.  -1.  -0.5   0.   0.5   1.   2.   3.   Inf
62   -Inf  -2.  -1.  -0.5   0.   0.5   1.   2.   3.   Inf
63
64 --> atanh(x')
65  ans  =
66    0.        + 1.5707963i
67   -0.5493061 + 1.5707963i
68   -Inf       + 0.i       
69   -0.5493061 + 0.i       
70    0.        + 0.i       
71    0.5493061 + 0.i       
72    Inf       + 0.i       
73    0.5493061 + 1.5707963i
74    0.3465736 + 1.5707963i
75    0.        + 1.5707963i
76 ]]></screen>
77         <para>
78             With input complex numbers:
79         </para>
80         <programlisting role="example"><![CDATA[
81 x = [-1-%i, -%i, 0, %i, %i+1];
82 [x; tanh(atanh(x)) ; atanh(tanh(x))]
83 atanh(x.')
84  ]]></programlisting>
85     <screen><![CDATA[
86 --> [x; tanh(atanh(x)) ; atanh(tanh(x))]
87  ans  =
88
89   -1. - i     0. - i     0. + 0.i   0. + i     1. + i  
90   -1. - i     0. - i     0. + 0.i   0. + i     1. + i  
91   -1. - i     0. - i     0. + 0.i   0. + i     1. + i  
92
93 --> atanh(x.')
94  ans  =
95
96   -0.4023595 - 1.017222i
97    0.        - 0.7853982i
98    0.        + 0.i      
99    0.        + 0.7853982i
100    0.4023595 + 1.017222i
101 ]]></screen>
102     </refsection>
103     <refsection role="see also">
104         <title>See also</title>
105         <simplelist type="inline">
106             <member>
107                 <link linkend="tanh">tanh</link>
108             </member>
109         </simplelist>
110     </refsection>
111     <refsection role="history">
112         <title>History</title>
113         <revhistory>
114             <revision>
115                 <revnumber>6.0</revnumber>
116                 <revdescription>
117                     <itemizedlist>
118                         <listitem>
119                             <literal>atanh(-1)</literal> is now always <literal>-Inf</literal>, and
120                             <literal>atanh(1)</literal> always <literal>Inf</literal>.
121                         </listitem>
122                         <listitem>
123                             For any real x>1, imag(atanh(x)) is now > 0.
124                         </listitem>
125                     </itemizedlist>
126                 </revdescription>
127             </revision>
128         </revhistory>
129     </refsection>
130 </refentry>