summaryrefslogtreecommitdiff
path: root/devdocs/c/numeric%2Fmath%2Facosh.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%2Fmath%2Facosh.html
new repository
Diffstat (limited to 'devdocs/c/numeric%2Fmath%2Facosh.html')
-rw-r--r--devdocs/c/numeric%2Fmath%2Facosh.html87
1 files changed, 87 insertions, 0 deletions
diff --git a/devdocs/c/numeric%2Fmath%2Facosh.html b/devdocs/c/numeric%2Fmath%2Facosh.html
new file mode 100644
index 00000000..2288743c
--- /dev/null
+++ b/devdocs/c/numeric%2Fmath%2Facosh.html
@@ -0,0 +1,87 @@
+ <h1 id="firstHeading" class="firstHeading">acosh, acoshf, acoshl</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;math.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">float acoshf( float arg );</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 acosh( double arg );</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 acoshl( long double arg );</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( arg )</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 inverse hyperbolic cosine of <code>arg</code>.</div> <div class="t-li1">
+<span class="t-li">4)</span> Type-generic macro: If the argument has type <code>long double</code>, <code>acoshl</code> is called. Otherwise, if the argument has integer type or the type <code>double</code>, <code>acosh</code> is called. Otherwise, <code>acoshf</code> is called. If the argument is complex, then the macro invokes the corresponding complex function (<code><a href="http://en.cppreference.com/w/c/numeric/complex/cacosh"><span class="kw799">cacoshf</span></a></code>, <code><a href="http://en.cppreference.com/w/c/numeric/complex/cacosh"><span class="kw798">cacosh</span></a></code>, <code><a href="http://en.cppreference.com/w/c/numeric/complex/cacosh"><span class="kw800">cacoshl</span></a></code>).</div> <h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> arg </td> <td> - </td> <td> floating point value representing the area of a hyperbolic sector </td>
+</tr>
+</table> <h3 id="Return_value"> Return value</h3> <p>If no errors occur, the inverse hyperbolic cosine of <code>arg</code> (cosh<sup class="t-su">-1</sup>(arg), or arcosh(arg)) on the interval [0, +∞], is returned.</p>
+<p>If a domain error occurs, an implementation-defined value is returned (NaN where supported).</p>
+<h3 id="Error_handling"> Error handling</h3> <p>Errors are reported as specified in <a href="math_errhandling" title="c/numeric/math/math errhandling"><code>math_errhandling</code></a>.</p>
+<p>If the argument is less than 1, a domain error occurs.</p>
+<p>If the implementation supports IEEE floating-point arithmetic (IEC 60559),</p>
+<ul>
+<li> if the argument is less than 1, <code><a href="../fenv/fe_exceptions" title="c/numeric/fenv/FE exceptions">FE_INVALID</a></code> is raised an NaN is returned </li>
+<li> if the argument is 1, +0 is returned </li>
+<li> if the argument is +∞, +∞ is returned </li>
+<li> if the argument is NaN, NaN is returned. </li>
+</ul> <h3 id="Notes"> Notes</h3> <p>Although the C standard names this function "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 "inverse hyperbolic cosine" (used by POSIX) or "area hyperbolic cosine".</p>
+<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;math.h&gt;
+#include &lt;float.h&gt;
+#include &lt;errno.h&gt;
+#include &lt;fenv.h&gt;
+#pragma STDC FENV_ACCESS ON
+
+int main(void)
+{
+ printf("acosh(1) = %f\nacosh(10) = %f\n", acosh(1), acosh(10));
+ printf("acosh(DBL_MAX) = %f\nacosh(Inf) = %f\n", acosh(DBL_MAX), acosh(INFINITY));
+ // error handling
+ errno = 0; feclearexcept(FE_ALL_EXCEPT);
+ printf("acosh(0.5) = %f\n", acosh(0.5));
+ if (errno == EDOM)
+ perror(" errno == EDOM");
+ if (fetestexcept(FE_INVALID))
+ puts(" FE_INVALID raised");
+}</pre></div> <p>Possible output:</p>
+<div class="text source-text"><pre data-language="c">acosh(1) = 0.000000
+acosh(10) = 2.993223
+acosh(DBL_MAX) = 710.475860
+acosh(Inf) = inf
+acosh(0.5) = -nan
+ errno == EDOM: Numerical argument out of domain
+ FE_INVALID raised</pre></div> </div> <h3 id="References"> References</h3> <ul>
+<li> C23 standard (ISO/IEC 9899:2023): </li>
+<ul>
+<li> 7.12.5.1 The acosh functions (p: TBD) </li>
+<li> 7.27 Type-generic math &lt;tgmath.h&gt; (p: TBD) </li>
+<li> F.10.2.1 The acosh functions (p: TBD) </li>
+</ul>
+<li> C17 standard (ISO/IEC 9899:2018): </li>
+<ul>
+<li> 7.12.5.1 The acosh functions (p: 175) </li>
+<li> 7.25 Type-generic math &lt;tgmath.h&gt; (p: 272-273) </li>
+<li> F.10.2.1 The acosh functions (p: 379) </li>
+</ul>
+<li> C11 standard (ISO/IEC 9899:2011): </li>
+<ul>
+<li> 7.12.5.1 The acosh functions (p: 240) </li>
+<li> 7.25 Type-generic math &lt;tgmath.h&gt; (p: 373-375) </li>
+<li> F.10.2.1 The acosh functions (p: 520) </li>
+</ul>
+<li> C99 standard (ISO/IEC 9899:1999): </li>
+<ul>
+<li> 7.12.5.1 The acosh functions (p: 221) </li>
+<li> 7.22 Type-generic math &lt;tgmath.h&gt; (p: 335-337) </li>
+<li> F.9.2.1 The acosh functions (p: 457) </li>
+</ul>
+</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="asinh" title="c/numeric/math/asinh"> <span class="t-lines"><span>asinh</span><span>asinhf</span><span>asinhl</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 sine (\({\small\operatorname{arsinh}{x} }\)arsinh(x)) <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="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> <div><a href="cosh" title="c/numeric/math/cosh"> <span class="t-lines"><span>cosh</span><span>coshf</span><span>coshl</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></div> </td> <td> computes hyperbolic cosine (\({\small\cosh{x} }\)cosh(x)) <br> <span class="t-mark">(function)</span> </td>
+</tr> <tr class="t-dsc"> <td> <div><a href="../complex/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 colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/numeric/math/acosh" title="cpp/numeric/math/acosh">C++ documentation</a></span> for <code>acosh</code> </td>
+</tr> </table> <h3 id="External_links"> External links</h3> <table> <tr style="vertical-align:top;"> <td> </td> <td>
+<a rel="nofollow" class="external text" href="http://mathworld.wolfram.com/InverseHyperbolicCosine.html">Weisstein, Eric W. "Inverse Hyperbolic Cosine."</a> From MathWorld — A Wolfram Web Resource. </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/math/acosh" class="_attribution-link">https://en.cppreference.com/w/c/numeric/math/acosh</a>
+ </p>
+</div>