template< class T >
complex<T> acos( const complex<T>& z );
Computes complex arc cosine of a complex value z. Branch cuts exist outside the interval [â1, +1] along the real axis.
[edit] Parameters [edit] Return valueIf no errors occur, complex arc cosine of z is returned, in the range of a strip unbounded along the imaginary axis and in the interval [0, +Ï] along the real axis.
[edit] Error handling and special valuesErrors are reported consistent with math_errhandling.
If the implementation supports IEEE floating-point arithmetic,
(±0,+0)
, the result is (Ï/2,-0)
(±0,NaN)
, the result is (Ï/2,NaN)
(x,+â)
(for any finite x), the result is (Ï/2,-â)
(x,NaN)
(for any nonzero finite x), the result is (NaN,NaN)
and FE_INVALID may be raised.(-â,y)
(for any positive finite y), the result is (Ï,-â)
(+â,y)
(for any positive finite y), the result is (+0,-â)
(-â,+â)
, the result is (3Ï/4,-â)
(+â,+â)
, the result is (Ï/4,-â)
(屉,NaN)
, the result is (NaN,屉)
(the sign of the imaginary part is unspecified)(NaN,y)
(for any finite y), the result is (NaN,NaN)
and FE_INVALID may be raised(NaN,+â)
, the result is (NaN,-â)
(NaN,NaN)
, the result is (NaN,NaN)
Inverse cosine (or arc cosine) is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally 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 = Ï + iln(iz + â1-z2.
For any z, acos(z) = Ï - acos(-z).
[edit] ExampleOutput:
acos(-2.000000,0.000000) = (3.141593,-1.316958) acos(-2.000000,-0.000000) (the other side of the cut) = (3.141593,1.316958) cos(pi - acos(-2.000000,-0.000000)) = (2.000000,0.000000)[edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4