summaryrefslogtreecommitdiff
path: root/devdocs/c/numeric%2Fcomplex%2Fcatanh.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/c/numeric%2Fcomplex%2Fcatanh.html
new repository
Diffstat (limited to 'devdocs/c/numeric%2Fcomplex%2Fcatanh.html')
-rw-r--r--devdocs/c/numeric%2Fcomplex%2Fcatanh.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/devdocs/c/numeric%2Fcomplex%2Fcatanh.html b/devdocs/c/numeric%2Fcomplex%2Fcatanh.html
new file mode 100644
index 00000000..23fd8cf7
--- /dev/null
+++ b/devdocs/c/numeric%2Fcomplex%2Fcatanh.html
@@ -0,0 +1,78 @@
+ <h1 id="firstHeading" class="firstHeading">catanhf, catanh, catanhl</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;complex.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">float complex catanhf( float complex z );</pre>
+</td> <td> (1) </td> <td> <span class="t-mark-rev t-since-c99">(since C99)</span> </td> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">double complex catanh( double complex z );</pre>
+</td> <td> (2) </td> <td> <span class="t-mark-rev t-since-c99">(since C99)</span> </td> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">long double complex catanhl( long double complex z );</pre>
+</td> <td> (3) </td> <td> <span class="t-mark-rev t-since-c99">(since C99)</span> </td> </tr> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;tgmath.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">#define atanh( z )</pre>
+</td> <td> (4) </td> <td> <span class="t-mark-rev t-since-c99">(since C99)</span> </td> </tr> </table> <div class="t-li1">
+<span class="t-li">1-3)</span> Computes the complex arc hyperbolic tangent of <code>z</code> with branch cuts outside the interval [−1; +1] along the real axis.</div> <div class="t-li1">
+<span class="t-li">4)</span> Type-generic macro: If <code>z</code> has type <code><span class="kw4">long</span> <span class="kw4">double</span> <a href="http://en.cppreference.com/w/c/numeric/complex/complex"><span class="kw743">complex</span></a></code>, <code>catanhl</code> is called. if <code>z</code> has type <code><span class="kw4">double</span> <a href="http://en.cppreference.com/w/c/numeric/complex/complex"><span class="kw743">complex</span></a></code>, <code>catanh</code> is called, if <code>z</code> has type <code><span class="kw4">float</span> <a href="http://en.cppreference.com/w/c/numeric/complex/complex"><span class="kw743">complex</span></a></code>, <code>catanhf</code> is called. If <code>z</code> is real or integer, then the macro invokes the corresponding real function (<code>atanhf</code>, <code><a href="http://en.cppreference.com/w/c/numeric/math/atanh"><span class="kw681">atanh</span></a></code>, <code>atanhl</code>). If <code>z</code> is imaginary, then the macro invokes the corresponding real version of <code><a href="http://en.cppreference.com/w/c/numeric/math/atan"><span class="kw674">atan</span></a></code>, implementing the formula atanh(iy) = i atan(y), and the return type is imaginary.</div> <h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> z </td> <td> - </td> <td> complex argument </td>
+</tr>
+</table> <h3 id="Return_value"> Return value</h3> <p>If no errors occur, the complex arc hyperbolic tangent of <code>z</code> is returned, in the range of a half-strip mathematically unbounded along the real axis and in the interval [−iπ/2; +iπ/2] along the imaginary axis.</p>
+<h3 id="Error_handling_and_special_values"> Error handling and special values</h3> <p>Errors are reported consistent with <a href="../math/math_errhandling" title="c/numeric/math/math errhandling">math_errhandling</a></p>
+<p>If the implementation supports IEEE floating-point arithmetic,</p>
+<ul>
+<li> <code>catanh<span class="br0">(</span><a href="http://en.cppreference.com/w/c/numeric/complex/conj"><span class="kw760">conj</span></a><span class="br0">(</span>z<span class="br0">)</span><span class="br0">)</span> <span class="sy1">==</span> <a href="http://en.cppreference.com/w/c/numeric/complex/conj"><span class="kw760">conj</span></a><span class="br0">(</span>catanh<span class="br0">(</span>z<span class="br0">)</span><span class="br0">)</span></code> </li>
+<li> <code>catanh(-z) == -catanh(z)</code> </li>
+<li> If <code>z</code> is <code>+0+0i</code>, the result is <code>+0+0i</code> </li>
+<li> If <code>z</code> is <code>+0+NaNi</code>, the result is <code>+0+NaNi</code> </li>
+<li> If <code>z</code> is <code>+1+0i</code>, the result is <code>+∞+0i</code> and <code><a href="../fenv/fe_exceptions" title="c/numeric/fenv/FE exceptions">FE_DIVBYZERO</a></code> is raised </li>
+<li> If <code>z</code> is <code>x+∞i</code> (for any finite positive x), the result is <code>+0+iπ/2</code> </li>
+<li> If <code>z</code> is <code>x+NaNi</code> (for any finite nonzero x), the result is <code>NaN+NaNi</code> and <code><a href="../fenv/fe_exceptions" title="c/numeric/fenv/FE exceptions">FE_INVALID</a></code> may be raised </li>
+<li> If <code>z</code> is <code>+∞+yi</code> (for any finite positive y), the result is <code>+0+iπ/2</code> </li>
+<li> If <code>z</code> is <code>+∞+∞i</code>, the result is <code>+0+iπ/2</code> </li>
+<li> If <code>z</code> is <code>+∞+NaNi</code>, the result is <code>+0+NaNi</code> </li>
+<li> If <code>z</code> is <code>NaN+yi</code> (for any finite y), the result is <code>NaN+NaNi</code> and <code><a href="../fenv/fe_exceptions" title="c/numeric/fenv/FE exceptions">FE_INVALID</a></code> may be raised </li>
+<li> If <code>z</code> is <code>NaN+∞i</code>, the result is <code>±0+iπ/2</code> (the sign of the real part is unspecified) </li>
+<li> If <code>z</code> is <code>NaN+NaNi</code>, the result is <code>NaN+NaNi</code> </li>
+</ul> <h3 id="Notes"> Notes</h3> <p>Although the C standard names this function "complex arc hyperbolic tangent", the inverse functions of the hyperbolic functions are the area functions. Their argument is the area of a hyperbolic sector, not an arc. The correct name is "complex inverse hyperbolic tangent", and, less common, "complex area hyperbolic tangent".</p>
+<p>Inverse hyperbolic tangent is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally placed at the line segmentd (-∞,-1] and [+1,+∞) of the real axis. The mathematical definition of the principal value of the inverse hyperbolic tangent is atanh z =</p>
+<span><span>ln(1+z)-ln(z-1)</span><span>/</span><span>2</span></span>. <p><br> For any z, atanh(z) =</p>
+<span><span>atan(iz)</span><span>/</span><span>i</span></span> <h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include &lt;stdio.h&gt;
+#include &lt;complex.h&gt;
+
+int main(void)
+{
+ double complex z = catanh(2);
+ printf("catanh(+2+0i) = %f%+fi\n", creal(z), cimag(z));
+
+ double complex z2 = catanh(conj(2)); // or catanh(CMPLX(2, -0.0)) in C11
+ printf("catanh(+2-0i) (the other side of the cut) = %f%+fi\n", creal(z2), cimag(z2));
+
+ // for any z, atanh(z) = atan(iz)/i
+ double complex z3 = catanh(1+2*I);
+ printf("catanh(1+2i) = %f%+fi\n", creal(z3), cimag(z3));
+ double complex z4 = catan((1+2*I)*I)/I;
+ printf("catan(i * (1+2i))/i = %f%+fi\n", creal(z4), cimag(z4));
+}</pre></div> <p>Output:</p>
+<div class="text source-text"><pre data-language="c">catanh(+2+0i) = 0.549306+1.570796i
+catanh(+2-0i) (the other side of the cut) = 0.549306-1.570796i
+catanh(1+2i) = 0.173287+1.178097i
+catan(i * (1+2i))/i = 0.173287+1.178097i</pre></div> </div> <h3 id="References"> References</h3> <ul>
+<li> C11 standard (ISO/IEC 9899:2011): </li>
+<ul>
+<li> 7.3.6.3 The catanh functions (p: 193) </li>
+<li> 7.25 Type-generic math &lt;tgmath.h&gt; (p: 373-375) </li>
+<li> G.6.2.3 The catanh functions (p: 540-541) </li>
+<li> G.7 Type-generic math &lt;tgmath.h&gt; (p: 545) </li>
+</ul>
+<li> C99 standard (ISO/IEC 9899:1999): </li>
+<ul>
+<li> 7.3.6.3 The catanh functions (p: 175) </li>
+<li> 7.22 Type-generic math &lt;tgmath.h&gt; (p: 335-337) </li>
+<li> G.6.2.3 The catanh functions (p: 475-476) </li>
+<li> G.7 Type-generic math &lt;tgmath.h&gt; (p: 480) </li>
+</ul>
+</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="casinh" title="c/numeric/complex/casinh"> <span class="t-lines"><span>casinh</span><span>casinhf</span><span>casinhl</span></span></a></div>
+<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> computes the complex arc hyperbolic sine <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="cacosh" title="c/numeric/complex/cacosh"> <span class="t-lines"><span>cacosh</span><span>cacoshf</span><span>cacoshl</span></span></a></div>
+<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> computes the complex arc hyperbolic cosine <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="ctanh" title="c/numeric/complex/ctanh"> <span class="t-lines"><span>ctanh</span><span>ctanhf</span><span>ctanhl</span></span></a></div>
+<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> computes the complex hyperbolic tangent <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="../math/atanh" title="c/numeric/math/atanh"> <span class="t-lines"><span>atanh</span><span>atanhf</span><span>atanhl</span></span></a></div>
+<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> computes inverse hyperbolic tangent (\({\small\operatorname{artanh}{x} }\)artanh(x)) <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/numeric/complex/atanh" title="cpp/numeric/complex/atanh">C++ documentation</a></span> for <code>atanh</code> </td>
+</tr> </table> <div class="_attribution">
+ <p class="_attribution-p">
+ &copy; cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br>
+ <a href="https://en.cppreference.com/w/c/numeric/complex/catanh" class="_attribution-link">https://en.cppreference.com/w/c/numeric/complex/catanh</a>
+ </p>
+</div>