## 4.8 Complex trigonometric functions

The standard trigonometric functions are supported for complex numbers.

complex cos(complex z)
Return the complex cosine of z, which is $\begin{equation*} \cos(z) = \textrm{cosh}(z \, i) = \frac{\displaystyle \exp(z \, i) + \exp(-z \, i)} {\displaystyle 2}. \end{equation*}$
Available since 2.28

complex sin(complex z)
Return the complex sine of z, $\begin{equation*} \sin(z) = -\textrm{sinh}(z \, i) \, i = \frac{\displaystyle \exp(z \, i) - \exp(-z \, i)} {\displaystyle 2 \, i}. \end{equation*}$
Available since 2.28

complex tan(complex z)
Return the complex tangent of z, $\begin{equation*} \tan(z) = -\textrm{tanh}(z \, i) \, i = \frac{(\exp(-z \, i) - \exp(z \, i)) \, i} {\exp(-z \, i) + \exp(z \, i)}. \end{equation*}$
Available since 2.28

complex acos(complex z)
Return the complex arc (inverse) cosine of z, $\begin{equation*} \textrm{acos}(z) = \frac{1}{2} \pi + \log (z \, i + \sqrt{1 - z^2}) \, i. \end{equation*}$
Available since 2.28

complex asin(complex z)
Return the complex arc (inverse) sine of z, $\begin{equation*} \text{asin}(z) = -\log(z \, i + \sqrt{1 - z^2}) \, i. \end{equation*}$
Available since 2.28

complex atan(complex z)
Return the complex arc (inverse) tangent of z, $\begin{equation*} \text{atan}(z) = - \frac{1}{2} (\log(1 - z \, i) - \log(1 + z \, i)) \, i. \end{equation*}$
Available since 2.28