Complex.Tan(Complex) Metodo

Definizione

Restituisce la tangente del numero complesso specificato.

public:
 static System::Numerics::Complex Tan(System::Numerics::Complex value);
public static System.Numerics.Complex Tan (System.Numerics.Complex value);
static member Tan : System.Numerics.Complex -> System.Numerics.Complex
Public Shared Function Tan (value As Complex) As Complex

Parametri

value
Complex

Numero complesso.

Restituisce

Complex

Tangente di value.

Esempio

Nell'esempio seguente viene illustrato il Tan metodo . Mostra che il passaggio del valore restituito dal Atan metodo al Tan metodo restituisce il valore originale Complex .

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(2.5, 1.5),
                           new Complex(2.5, -1.5),
                           new Complex(-2.5, 1.5),
                           new Complex(-2.5, -1.5) };
      foreach (Complex value in values)
         Console.WriteLine("Tan(Atan({0})) = {1}",
                            value, Complex.Tan(Complex.Atan(value)));
   }
}
// The example displays the following output:
//       Tan(Atan((2.5, 1.5))) = (2.5, 1.5)
//       Tan(Atan((2.5, -1.5))) = (2.5, -1.5)
//       Tan(Atan((-2.5, 1.5))) = (-2.5, 1.5)
//       Tan(Atan((-2.5, -1.5))) = (-2.5, -1.5)
Imports System.Numerics

Module Example
   Public Sub Main()
      Dim values() As Complex = { New Complex(2.5, 1.5), 
                                  New Complex(2.5, -1.5), 
                                  New Complex(-2.5, 1.5), 
                                  New Complex(-2.5, -1.5) }
      For Each value As Complex In values
         Console.WriteLine("Tan(Atan({0})) = {1}", 
                            value, Complex.Tan(Complex.Atan(value)))
      Next                               
   End Sub
End Module
' The example displays the following example:
'       Tan(Atan((2.5, 1.5))) = (2.5, 1.5)
'       Tan(Atan((2.5, -1.5))) = (2.5, -1.5)
'       Tan(Atan((-2.5, 1.5))) = (-2.5, 1.5)
'       Tan(Atan((-2.5, -1.5))) = (-2.5, -1.5)

Commenti

Il Tan metodo per i numeri complessi corrisponde al Math.Tan metodo per i numeri reali.

Il Tan metodo usa la formula seguente per calcolare la tangente del numero valuecomplesso :

Sin(value) / Cos(value)

Si applica a

Vedi anche