複素数の指数関数
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static FCOMPLEX fnFIE_cexp(
FCOMPLEX c
) |
Visual Basic |
---|
Public Shared Function fnFIE_cexp (
c As FCOMPLEX
) As FCOMPLEX |
Return Value
Type:
FCOMPLEX複素数関数exp( c )の結果を返します。
Remarks
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
[FvPluginExecute]
public void fnFIE_cexp()
{
FCOMPLEX c1 = new FCOMPLEX();
FCOMPLEX c2 = new FCOMPLEX();
c1 = api.fnFIE_fcomplex(1.1, 2.2);
c2 = api.fnFIE_cexp(c1);
Assert.IsTrue(compare(c2.real, Math.Exp(1.1)*Math.Cos(2.2), defs.DBL_EPS), "エラーが発生しました。(c2.real={0})", c2.real);
Assert.IsTrue(compare(c2.image, Math.Exp(1.1)*Math.Sin(2.2), defs.DBL_EPS), "エラーが発生しました。(c2.image={0})", c2.image);
ConsoleOut.WriteFunctionName(":\t");
Console.Write(" ...");
ConsoleOut.IsTrue(DblEqual(c2.real, Math.Exp(1.1) * Math.Cos(2.2)) && DblEqual(c2.image, Math.Exp(1.1) * Math.Sin(2.2)));
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_cexp()
Dim c1 As New FCOMPLEX()
Dim c2 As New FCOMPLEX()
c1 = api.fnFIE_fcomplex(1.1, 2.2)
c2 = api.fnFIE_cexp(c1)
Assert.IsTrue(compare(c2.real, Math.Exp(1.1) * Math.Cos(2.2), defs.DBL_EPS), "エラーが発生しました。(c2.real={0})", c2.real)
Assert.IsTrue(compare(c2.image, Math.Exp(1.1) * Math.Sin(2.2), defs.DBL_EPS), "エラーが発生しました。(c2.image={0})", c2.image)
ConsoleOut.WriteFunctionName(":" & vbTab)
Console.Write(" ...")
ConsoleOut.IsTrue(DblEqual(c2.real, Math.Exp(1.1) * Math.Cos(2.2)) AndAlso DblEqual(c2.image, Math.Exp(1.1) * Math.Sin(2.2)))
End Sub
End Class |
See Also