C examples for complex.h:tan
function template
<complex> <complex.h>
template<class T> complex<T> tan (const complex<T>& x);
Tangent of complex
Parameter | Description |
---|---|
x | Complex value, representing an angle expressed in radians. |
Tangent of x.
#include <iostream> // std::cout #include <complex> // std::complex, std::real int main ()// ww w .jav a 2 s . co m { std::complex<double> mycomplex (10.0,1.0); std::cout << std::tan(mycomplex) << '\n'; return 0; }