Baca dalam bahasa Inggris

Bagikan melalui


Complex.Log Metode

Definisi

Mengembalikan logaritma bilangan kompleks.

Overload

Log(Complex)

Mengembalikan logaritma natural (dasar e) dari bilangan kompleks tertentu.

Log(Complex, Double)

Mengembalikan logaritma bilangan kompleks tertentu dalam basis tertentu.

Log(Complex)

Sumber:
Complex.cs
Sumber:
Complex.cs
Sumber:
Complex.cs

Mengembalikan logaritma natural (dasar e) dari bilangan kompleks tertentu.

public static System.Numerics.Complex Log (System.Numerics.Complex value);

Parameter

value
Complex

Bilangan kompleks.

Mengembalikan

Logaritma alami (dasar e) dari value.

Contoh

Contoh berikut mengilustrasikan Log metode . Ini menunjukkan bahwa, dengan beberapa tunjangan untuk kurangnya presisi Double jenis data, meneruskan nilai yang dikembalikan oleh Log metode ke Exp metode mengembalikan nilai asli 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)

Keterangan

Metode Log(Complex) untuk bilangan Math.Log(Double) kompleks sesuai dengan metode untuk angka riil.

Lihat juga

Berlaku untuk

.NET 9 dan versi lainnya
Produk Versi
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Log(Complex, Double)

Sumber:
Complex.cs
Sumber:
Complex.cs
Sumber:
Complex.cs

Mengembalikan logaritma bilangan kompleks tertentu dalam basis tertentu.

public static System.Numerics.Complex Log (System.Numerics.Complex value, double baseValue);

Parameter

value
Complex

Bilangan kompleks.

baseValue
Double

Dasar logaritma.

Mengembalikan

Logaritma dalam value basis baseValue.

Keterangan

Metode Log(Complex, Double) untuk bilangan Math.Log(Double, Double) kompleks sesuai dengan metode untuk angka riil.

Berlaku untuk

.NET 9 dan versi lainnya
Produk Versi
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0