cacosf, cacos, cacosl
From cppreference.com
| Defined in header <complex.h>
|
||
| (1) | (since C99) | |
| (2) | (since C99) | |
| (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 [0 ; ∞) along the real axis and in the range [−iπ ; iπ] along the imaginary axis.
Error handling and special values
Errors are reported consistent with math_errhandling
If the implementation supports IEEE floating-point arithmetic,
- cacos(conj(z)) == conj(cacos(z))
- If
zis±0+0i, the result isπ/2-0i - If
zis±0+NaNi, the result isπ/2+NaNi - If
zisx+∞i(for any finite x), the result isπ/2-∞i - If
zisx+NaNi(for any nonzero finite x), the result isNaN+NaNiand FE_INVALID may be raised. - If
zis-∞+yi(for any positive finite y), the result isπ-∞i - If
zis-∞+yi(for any positive finite y), the result is+0-∞i - If
zis-∞+∞i, the result is3π/4-∞i - If
zis+∞+∞i, the result isπ/4-∞i - If
zis±∞+NaNi, the result isNaN±∞i(the sign of the imaginary part is unspecified) - If
zisNaN+yi(for any finite y), the result isNaN+NaNiand FE_INVALID may be raised - If
zisNaN+∞i, the result isNaN-∞i - If
zisNaN+NaNi, the result isNaN+NaNi
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 |
)
For any z, acos(z) = π - acos(-z)