C examples for complex.h:sin
function template
<complex> <complex.h>
template<class T> complex<T> sin (const complex<T>& x);
Sine of complex
Parameter | Description |
---|---|
x | Complex value, representing an angle expressed in radians. |
Sine of x.
#include <iostream> // std::cout #include <complex> // std::complex, std::real int main ()/*from w w w .j av a 2s . c o m*/ { std::complex<double> mycomplex (10.0,1.0); std::cout << "Real part: " << std::sin(mycomplex) << '\n'; return 0; }