summaryrefslogtreecommitdiff
path: root/devdocs/c/numeric%2Fcomplex%2Fcacosh.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/c/numeric%2Fcomplex%2Fcacosh.html')
-rw-r--r--devdocs/c/numeric%2Fcomplex%2Fcacosh.html80
1 files changed, 80 insertions, 0 deletions
diff --git a/devdocs/c/numeric%2Fcomplex%2Fcacosh.html b/devdocs/c/numeric%2Fcomplex%2Fcacosh.html
new file mode 100644
index 00000000..9da0e7a1
--- /dev/null
+++ b/devdocs/c/numeric%2Fcomplex%2Fcacosh.html
@@ -0,0 +1,80 @@
+ <h1 id="firstHeading" class="firstHeading">cacoshf, cacosh, cacoshl</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 cacoshf( 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 cacosh( 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 cacoshl( 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 acosh( 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 complex arc hyperbolic cosine of a complex value <code>z</code> with branch cut at values less than 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>cacoshl</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>cacosh</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>cacoshf</code> is called. If <code>z</code> is real or integer, then the macro invokes the corresponding real function (<code>acoshf</code>, <code><a href="http://en.cppreference.com/w/c/numeric/math/acosh"><span class="kw680">acosh</span></a></code>, <code>acoshl</code>). If <code>z</code> is imaginary, then the macro invokes the corresponding complex number version and the return type is complex.</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>The complex arc hyperbolic cosine of <code>z</code> in the interval [0; ∞) along the real axis and in the interval [−iπ; +iπ] 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>cacosh<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>cacosh<span class="br0">(</span>z<span class="br0">)</span><span class="br0">)</span></code> </li>
+<li> If <code>z</code> is <code>±0+0i</code>, the result is <code>+0+iπ/2</code> </li>
+<li> If <code>z</code> is <code>+x+∞i</code> (for any finite x), the result is <code>+∞+iπ/2</code> </li>
+<li> If <code>z</code> is <code>+x+NaNi</code> (for non-zero finite 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>0+NaNi</code>, the result is <code>NaN±iπ/2</code>, where the sign of the imaginary part is unspecified </li>
+<li> If <code>z</code> is <code>-∞+yi</code> (for any positive finite y), the result is <code>+∞+iπ</code> </li>
+<li> If <code>z</code> is <code>+∞+yi</code> (for any positive finite y), the result is <code>+∞+0i</code> </li>
+<li> If <code>z</code> is <code>-∞+∞i</code>, the result is <code>+∞+3iπ/4</code> </li>
+<li> If <code>z</code> is <code>+∞+∞i</code>, the result is <code>+∞+iπ/4</code> </li>
+<li> If <code>z</code> is <code>±∞+NaNi</code>, the result is <code>+∞+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>+∞+NaNi</code> </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 cosine", 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 cosine", and, less common, "complex area hyperbolic cosine".</p>
+<p>Inverse hyperbolic cosine is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally placed at the line segment (-∞,+1) of the real axis.</p>
+<p>The mathematical definition of the principal value of the inverse hyperbolic cosine is acosh z = ln(z + <span class="t-mrad"><span>√</span><span>z+1</span></span> <span class="t-mrad"><span>√</span><span>z-1</span></span>) For any z, acosh(z) =</p>
+<span><span>√z-1</span><span>/</span><span>√1-z</span></span> acos(z), or simply i acos(z) in the upper half of the complex plane. <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 = cacosh(0.5);
+ printf("cacosh(+0.5+0i) = %f%+fi\n", creal(z), cimag(z));
+
+ double complex z2 = conj(0.5); // or cacosh(CMPLX(0.5, -0.0)) in C11
+ printf("cacosh(+0.5-0i) (the other side of the cut) = %f%+fi\n", creal(z2), cimag(z2));
+
+ // in upper half-plane, acosh(z) = i*acos(z)
+ double complex z3 = casinh(1+I);
+ printf("casinh(1+1i) = %f%+fi\n", creal(z3), cimag(z3));
+ double complex z4 = I*casin(1+I);
+ printf("I*asin(1+1i) = %f%+fi\n", creal(z4), cimag(z4));
+}</pre></div> <p>Output:</p>
+<div class="text source-text"><pre data-language="c">cacosh(+0.5+0i) = 0.000000-1.047198i
+cacosh(+0.5-0i) (the other side of the cut) = 0.500000-0.000000i
+casinh(1+1i) = 1.061275+0.666239i
+I*asin(1+1i) = -1.061275+0.666239i</pre></div> </div> <h3 id="References"> References</h3> <ul>
+<li> C11 standard (ISO/IEC 9899:2011): </li>
+<ul>
+<li> 7.3.6.1 The cacosh functions (p: 192) </li>
+<li> 7.25 Type-generic math &lt;tgmath.h&gt; (p: 373-375) </li>
+<li> G.6.2.1 The cacosh functions (p: 539-540) </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.1 The cacosh functions (p: 174) </li>
+<li> 7.22 Type-generic math &lt;tgmath.h&gt; (p: 335-337) </li>
+<li> G.6.2.1 The cacosh functions (p: 474-475) </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="cacos" title="c/numeric/complex/cacos"> <span class="t-lines"><span>cacos</span><span>cacosf</span><span>cacosl</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 cosine <br> <span class="t-mark">(function)</span> </td>
+</tr> <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="catanh" title="c/numeric/complex/catanh"> <span class="t-lines"><span>catanh</span><span>catanhf</span><span>catanhl</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 tangent <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="ccosh" title="c/numeric/complex/ccosh"> <span class="t-lines"><span>ccosh</span><span>ccoshf</span><span>ccoshl</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 cosine <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="../math/acosh" title="c/numeric/math/acosh"> <span class="t-lines"><span>acosh</span><span>acoshf</span><span>acoshl</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 cosine (\({\small\operatorname{arcosh}{x} }\)arcosh(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/acosh" title="cpp/numeric/complex/acosh">C++ documentation</a></span> for <code>acosh</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/cacosh" class="_attribution-link">https://en.cppreference.com/w/c/numeric/complex/cacosh</a>
+ </p>
+</div>