diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/numeric%2Fcomplex%2Fcarg.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/numeric%2Fcomplex%2Fcarg.html')
| -rw-r--r-- | devdocs/c/numeric%2Fcomplex%2Fcarg.html | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/devdocs/c/numeric%2Fcomplex%2Fcarg.html b/devdocs/c/numeric%2Fcomplex%2Fcarg.html deleted file mode 100644 index 608d566f..00000000 --- a/devdocs/c/numeric%2Fcomplex%2Fcarg.html +++ /dev/null @@ -1,55 +0,0 @@ - <h1 id="firstHeading" class="firstHeading">cargf, carg, cargl</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><complex.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">float cargf( 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 carg( 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 cargl( 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><tgmath.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">#define carg( 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 argument (also called phase angle) of <code>z</code>, with a branch cut along the negative 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><span class="kw4">long</span> <span class="kw4">double</span> <a href="http://en.cppreference.com/w/c/numeric/complex/imaginary"><span class="kw745">imaginary</span></a></code>, or <code>long double</code>, <code>cargl</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><span class="kw4">float</span> <a href="http://en.cppreference.com/w/c/numeric/complex/imaginary"><span class="kw745">imaginary</span></a></code>, or <code>float</code>, <code>cargf</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><span class="kw4">double</span> <a href="http://en.cppreference.com/w/c/numeric/complex/imaginary"><span class="kw745">imaginary</span></a></code>, <code>double</code>, or any integer type, <code>carg</code> is called.</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, returns the phase angle of <code>z</code> in the interval [−π; π].</p> -<p>Errors and special cases are handled as if the function is implemented as <code><a href="http://en.cppreference.com/w/c/numeric/math/atan2"><span class="kw675">atan2</span></a><span class="br0">(</span><a href="http://en.cppreference.com/w/c/numeric/complex/cimag"><span class="kw751">cimag</span></a><span class="br0">(</span>z<span class="br0">)</span>, <a href="http://en.cppreference.com/w/c/numeric/complex/creal"><span class="kw754">creal</span></a><span class="br0">(</span>z<span class="br0">)</span><span class="br0">)</span></code></p> -<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include <stdio.h> -#include <complex.h> - -int main(void) -{ - double complex z1 = 1.0+0.0*I; - printf("phase angle of %.1f%+.1fi is %f\n", creal(z1), cimag(z1), carg(z1)); - - double complex z2 = 0.0+1.0*I; - printf("phase angle of %.1f%+.1fi is %f\n", creal(z2), cimag(z2), carg(z2)); - - double complex z3 = -1.0+0.0*I; - printf("phase angle of %.1f%+.1fi is %f\n", creal(z3), cimag(z3), carg(z3)); - - double complex z4 = conj(z3); // or CMPLX(-1, -0.0) - printf("phase angle of %.1f%+.1fi (the other side of the cut) is %f\n", - creal(z4), cimag(z4), carg(z4)); -}</pre></div> <p>Output:</p> -<div class="text source-text"><pre data-language="c">phase angle of 1.0+0.0i is 0.000000 -phase angle of 0.0+1.0i is 1.570796 -phase angle of -1.0+0.0i is 3.141593 -phase angle of -1.0-0.0i (the other side of the cut) is -3.141593</pre></div> </div> <h3 id="References"> References</h3> <ul> -<li> C11 standard (ISO/IEC 9899:2011): </li> -<ul> -<li> 7.3.9.1 The carg functions (p: 196) </li> -<li> 7.25 Type-generic math <tgmath.h> (p: 373-375) </li> -<li> G.7 Type-generic math <tgmath.h> (p: 545) </li> -</ul> -<li> C99 standard (ISO/IEC 9899:1999): </li> -<ul> -<li> 7.3.9.1 The carg functions (p: 178) </li> -<li> 7.22 Type-generic math <tgmath.h> (p: 335-337) </li> -<li> G.7 Type-generic math <tgmath.h> (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="cabs" title="c/numeric/complex/cabs"> <span class="t-lines"><span>cabs</span><span>cabsf</span><span>cabsl</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 magnitude of a complex number <br> <span class="t-mark">(function)</span> </td> -</tr> <tr class="t-dsc"> <td> <div><a href="../math/atan2" title="c/numeric/math/atan2"> <span class="t-lines"><span>atan2</span><span>atan2f</span><span>atan2l</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 arc tangent, using signs to determine quadrants <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/arg" title="cpp/numeric/complex/arg">C++ documentation</a></span> for <code>arg</code> </td> -</tr> </table> <div class="_attribution"> - <p class="_attribution-p"> - © 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/carg" class="_attribution-link">https://en.cppreference.com/w/c/numeric/complex/carg</a> - </p> -</div> |
