Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
Traduction
Source
Ce sujet n'a pas encore été évalué - Évaluez ce sujet

Functions tan

Retourne la tangente d'un nombre complexe.

template<class Type>
   complex<Type> tan(
      const complex<Type>& _ComplexNum
   );
_ComplexNum

Le nombre complexe que la tangente est déterminée.

Le nombre complexe qui est la tangente du nombre complexe d'entrée.

Identités définissant la cotangente complexe :

tan (z) = z sin (/) cos (z) = (exp (iz) – exp fonction de type (-iz( I)/exp (+)izexp (-iz))

// complex_tan.cpp
// compile with: /EHsc
#include <vector>
#include <complex>
#include <iostream>

int main( )
{
   using namespace std;
   double pi = 3.14159265359;
   complex <double> c1 ( 3.0 , 4.0 );
   cout << "Complex number c1 = " << c1 << endl;

   // Values of cosine of a complex number c1
   complex <double> c2 = tan ( c1 );
   cout << "Complex number c2 = tan ( c1 ) = " << c2 << endl;
   double absc2 = abs ( c2 );
   double argc2 = arg ( c2 );
   cout << "The modulus of c2 is: " << absc2 << endl;
   cout << "The argument of c2 is: "<< argc2 << " radians, which is " 
        << argc2 * 180 / pi << " degrees." << endl << endl; 

   // Hyperbolic tangent of the standard angles 
   // in the first two quadrants of the complex plane
   vector <complex <double> > v1;
   vector <complex <double> >::iterator Iter1;
   complex <double> vc1  ( polar ( 1.0, pi / 6 ) );
   v1.push_back( tan ( vc1 ) );
   complex <double> vc2  ( polar ( 1.0, pi / 3 ) );
   v1.push_back( tan ( vc2 ) );
   complex <double> vc3  ( polar ( 1.0, pi / 2 ) );
   v1.push_back( tan ( vc3) );
   complex <double> vc4  ( polar ( 1.0, 2 * pi / 3 ) );
   v1.push_back( tan ( vc4 ) );
   complex <double> vc5  ( polar ( 1.0, 5 * pi / 6 ) );
   v1.push_back( tan ( vc5 ) );
   complex <double> vc6  ( polar ( 1.0,  pi ) );
   v1.push_back( tan ( vc6 ) );

   cout << "The complex components tan (vci), where abs (vci) = 1"
        << "\n& arg (vci) = i * pi / 6 of the vector v1 are:\n" ;
   for ( Iter1 = v1.begin() ; Iter1 != v1.end() ; Iter1++ )
      cout << *Iter1 << endl;
}
Le nombre complexe c1 = (3,4) nombre complexe C2 tan = (c1) = (- 0,000187346, 0,999356) le modulo de C2 est : 0,999356 L'argument de C2 est : 1,57098 radians, qui est de 90,0107 degrés.Les composants complexes se bronzent (vci), où l'vci ABS () = 1 et l'arg (vci) = I * pi/6 du vecteur v1 sont : (0,713931, 0,85004) à (0,24356, 0,792403) (- 4.34302e-014,0.761594) (- 0,24356, 0,792403) (0,713931, 0,85004) à (1,55741 ), - 7.08476e-013)

en-tête : <complex>

l'espace de noms : DST

Cela vous a-t-il été utile ?
(1500 caractères restants)

Ajouts de la communauté

AJOUTER
© 2013 Microsoft. Tous droits réservés.