From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/numeric%2Fcomplex%2Fcacos.html | 76 -------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 devdocs/c/numeric%2Fcomplex%2Fcacos.html (limited to 'devdocs/c/numeric%2Fcomplex%2Fcacos.html') diff --git a/devdocs/c/numeric%2Fcomplex%2Fcacos.html b/devdocs/c/numeric%2Fcomplex%2Fcacos.html deleted file mode 100644 index d5f7cc0a..00000000 --- a/devdocs/c/numeric%2Fcomplex%2Fcacos.html +++ /dev/null @@ -1,76 +0,0 @@ -

cacosf, cacos, cacosl

Defined in header <complex.h>
float complex       cacosf( float complex z );
-
(1) (since C99)
double complex      cacos( double complex z );
-
(2) (since C99)
long double complex cacosl( long double complex z );
-
(3) (since C99)
Defined in header <tgmath.h>
#define acos( z )
-
(4) (since C99)
-1-3) Computes the complex arc cosine of z with branch cuts outside the interval [−1,+1] along the real axis.
-4) Type-generic macro: If z has type long double complex, cacosl is called. if z has type double complex, cacos is called, if z has type float complex, cacosf is called. If z is real or integer, then the macro invokes the corresponding real function (acosf, acos, acosl). If z is imaginary, then the macro invokes the corresponding complex number version.

Parameters

- -
z - complex argument

Return value

If no errors occur, complex arc cosine of z is returned, in the range a strip unbounded along the imaginary axis and in the interval [0; π] along the real axis.

-

Error handling and special values

Errors are reported consistent with math_errhandling.

-

If the implementation supports IEEE floating-point arithmetic,

-

Notes

Inverse cosine (or arc cosine) is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventially placed at the line segments (-∞,-1) and (1,∞) of the real axis. The mathematical definition of the principal value of arc cosine is acos z =

-1/2π + iln(iz + 1-z2)

For any z, acos(z) = π - acos(-z)

-

Example

#include <stdio.h>
-#include <math.h>
-#include <complex.h>
- 
-int main(void)
-{
-    double complex z = cacos(-2);
-    printf("cacos(-2+0i) = %f%+fi\n", creal(z), cimag(z));
- 
-    double complex z2 = cacos(conj(-2)); // or CMPLX(-2, -0.0)
-    printf("cacos(-2-0i) (the other side of the cut) = %f%+fi\n", creal(z2), cimag(z2));
- 
-    // for any z, acos(z) = pi - acos(-z)
-    double pi = acos(-1);
-    double complex z3 = ccos(pi-z2);
-    printf("ccos(pi - cacos(-2-0i) = %f%+fi\n", creal(z3), cimag(z3));
-}

Output:

-
cacos(-2+0i) = 3.141593-1.316958i
-cacos(-2-0i) (the other side of the cut) = 3.141593+1.316958i
-ccos(pi - cacos(-2-0i) = 2.000000+0.000000i

References

See also

- - - - -
-
(C99)(C99)(C99)
computes the complex arc sine
(function)
-
(C99)(C99)(C99)
computes the complex arc tangent
(function)
-
(C99)(C99)(C99)
computes the complex cosine
(function)
-
(C99)(C99)
computes arc cosine (\({\small\arccos{x} }\)arccos(x))
(function)
C++ documentation for acos
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/numeric/complex/cacos -

-
-- cgit v1.2.3