Complex.Log Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Restituisce il logaritmo di un numero complesso.
Overload
| Nome | Descrizione |
|---|---|
| Log(Complex) |
Restituisce il logaritmo naturale (base |
| Log(Complex, Double) |
Restituisce il logaritmo di un numero complesso specificato in una base specificata. |
Log(Complex)
Restituisce il logaritmo naturale (base e) di un numero complesso specificato.
public:
static System::Numerics::Complex Log(System::Numerics::Complex value);
public static System.Numerics.Complex Log(System.Numerics.Complex value);
static member Log : System.Numerics.Complex -> System.Numerics.Complex
Public Shared Function Log (value As Complex) As Complex
Parametri
- value
- Complex
Numero complesso.
Valori restituiti
Logaritmo naturale (base e) di value.
Esempio
Nell'esempio seguente viene illustrato il Log metodo . Mostra che, con una certa tolleranza per la mancanza di precisione del Double tipo di dati, passando il valore restituito dal Log metodo al Exp metodo restituisce il valore originale Complex .
using System;
using System.Numerics;
public class Example
{
public static void Main()
{
Complex[] values = { new Complex(1.53, 9.26),
new Complex(2.53, -8.12),
new Complex(-2.81, 5.32),
new Complex(-1.09, -3.43),
new Complex(Double.MinValue/2, Double.MinValue/2) };
foreach (Complex value in values)
Console.WriteLine("Exp(Log({0}) = {1}", value,
Complex.Exp(Complex.Log(value)));
}
}
// The example displays the following output:
// Exp(Log((1.53, 9.26)) = (1.53, 9.26)
// Exp(Log((2.53, -8.12)) = (2.53, -8.12)
// Exp(Log((-2.81, 5.32)) = (-2.81, 5.32)
// Exp(Log((-1.09, -3.43)) = (-1.09, -3.43)
// Exp(Log((-8.98846567431158E+307, -8.98846567431158E+307)) = (-8.98846567431161E+307, -8.98846567431161E+307)
open System
open System.Numerics
let values =
[ Complex(1.53, 9.26)
Complex(2.53, -8.12)
Complex(-2.81, 5.32)
Complex(-1.09, -3.43)
Complex(Double.MinValue / 2.0, Double.MinValue / 2.0) ]
for value in values do
printfn $"Exp(Log({value}) = {Complex.Exp(Complex.Log(value))}"
// The example displays the following output:
// Exp(Log((1.53, 9.26)) = (1.53, 9.26)
// Exp(Log((2.53, -8.12)) = (2.53, -8.12)
// Exp(Log((-2.81, 5.32)) = (-2.81, 5.32)
// Exp(Log((-1.09, -3.43)) = (-1.09, -3.43)
// Exp(Log((-8.98846567431158E+307, -8.98846567431158E+307)) = (-8.98846567431161E+307, -8.98846567431161E+307)
Imports System.Numerics
Module Example
Public Sub Main()
Dim values() As Complex = { New Complex(1.53, 9.26),
New Complex(2.53, -8.12),
New Complex(-2.81, 5.32),
New Complex(-1.09, -3.43),
New Complex(Double.MinValue/2, Double.MinValue/2) }
For Each value As Complex In values
Console.WriteLine("Exp(Log({0}) = {1}", value,
Complex.Exp(Complex.Log(value)))
Next
End Sub
End Module
' The example displays the following output:
' Exp(Log((1.53, 9.26)) = (1.53, 9.26)
' Exp(Log((2.53, -8.12)) = (2.53, -8.12)
' Exp(Log((-2.81, 5.32)) = (-2.81, 5.32)
' Exp(Log((-1.09, -3.43)) = (-1.09, -3.43)
' Exp(Log((-8.98846567431158E+307, -8.98846567431158E+307)) = (-8.98846567431161E+307, -8.98846567431161E+307)
Commenti
Il Log(Complex) metodo per i numeri complessi corrisponde al Math.Log(Double) metodo per i numeri reali.
Vedi anche
Si applica a
Log(Complex, Double)
Restituisce il logaritmo di un numero complesso specificato in una base specificata.
public:
static System::Numerics::Complex Log(System::Numerics::Complex value, double baseValue);
public static System.Numerics.Complex Log(System.Numerics.Complex value, double baseValue);
static member Log : System.Numerics.Complex * double -> System.Numerics.Complex
Public Shared Function Log (value As Complex, baseValue As Double) As Complex
Parametri
- value
- Complex
Numero complesso.
- baseValue
- Double
Base del logaritmo.
Valori restituiti
Logaritmo di value in base baseValue.
Commenti
Il Log(Complex, Double) metodo per i numeri complessi corrisponde al Math.Log(Double, Double) metodo per i numeri reali.