Complex.Exp(Complex) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回 e
的由一个复数指定的次幂。
public:
static System::Numerics::Complex Exp(System::Numerics::Complex value);
public static System.Numerics.Complex Exp (System.Numerics.Complex value);
static member Exp : System.Numerics.Complex -> System.Numerics.Complex
Public Shared Function Exp (value As Complex) As Complex
参数
- value
- Complex
指定幂的复数。
返回
数字 e
的 value
次幂。
示例
以下示例演示 了 Exp 方法。 它表明,由于数据类型的精度Double不足,将 方法Exp返回Log的值传递给 方法会返回原始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)
注解
Pow使用 方法计算其他基数的幂。
Exp复数的 方法对应于Math.Exp实数的 方法。 Exp 是 的反数 Log。