複素数の(実数)累乗関数
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static FCOMPLEX fnFIE_cpowd(
FCOMPLEX c,
double d
) |
Visual Basic |
---|
Public Shared Function fnFIE_cpowd (
c As FCOMPLEX,
d As Double
) As FCOMPLEX |
Return Value
Type:
FCOMPLEX複素数の(実数)累乗結果を返します。
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_cpowd()
{
FCOMPLEX c1 = new FCOMPLEX();
FCOMPLEX c2 = new FCOMPLEX();
FCOMPLEX c3 = new FCOMPLEX();
double d = 2.0;
c1 = api.fnFIE_fcomplex(1.1, 2.2);
c2 = api.fnFIE_cpowd(c1, 2.0);
c3 = api.fnFIE_clog(c1);
c3.real *= d;
c3.image *= d;
c3 = api.fnFIE_cexp(c3);
Assert.IsTrue(compare(c2.real, c3.real, defs.DBL_EPS), "エラーが発生しました。(c3.real={0})", c3.real);
Assert.IsTrue(compare(c2.image, c3.image, defs.DBL_EPS), "エラーが発生しました。(c3.image={0})", c3.image);
ConsoleOut.WriteFunctionName(":\t");
Console.Write(" ...");
ConsoleOut.IsTrue(DblEqual(c2.real, c3.real) && DblEqual(c2.image, c3.image));
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_cpowd()
Dim c1 As New FCOMPLEX()
Dim c2 As New FCOMPLEX()
Dim c3 As New FCOMPLEX()
Dim d As Double = 2.0
c1 = api.fnFIE_fcomplex(1.1, 2.2)
c2 = api.fnFIE_cpowd(c1, 2.0)
c3 = api.fnFIE_clog(c1)
c3.real *= d
c3.image *= d
c3 = api.fnFIE_cexp(c3)
Assert.IsTrue(compare(c2.real, c3.real, defs.DBL_EPS), "エラーが発生しました。(c3.real={0})", c3.real)
Assert.IsTrue(compare(c2.image, c3.image, defs.DBL_EPS), "エラーが発生しました。(c3.image={0})", c3.image)
ConsoleOut.WriteFunctionName(":" & vbTab)
Console.Write(" ...")
ConsoleOut.IsTrue(DblEqual(c2.real, c3.real) AndAlso DblEqual(c2.image, c3.image))
End Sub
End Class |
See Also