IStatistics.GammaFunc

Fore Syntax

GammaFunc(Value: Double): Double;

Fore.NET Syntax

GammaFunc(Value: double): double;

Parameters

Value. Value for which the Gamma function is calculated.

Description

The GammaFunc property returns value of Gamma function for selected argument.

Comments

Value of parameter Value must be greater than zero.

Fore Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    st: Statistics;
    d0, d: Double;
Begin
    st := New Statistics.Create;
    d := st.GammaFunc(4);
    d0 := st.GammaLn(4);
    If st.Status <> 0 Then
        Debug.WriteLine(st.Errors);
    Else
        Debug.WriteLine("Value of Gamma function: " + d.ToString);
        Debug.WriteLine("Natural logarithm of Gamma function: " + d0.ToString);
    End If;
End Sub UserProc;

After executing the example the console window displays values of gamma function and natural logarithm of gamma function for selected argument.

Fore.NET Example

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    st: Statistics;
    d0, d: Double;
Begin
    st := New Statistics.Create();
    d := st.GammaFunc(4);
    d0 := st.GammaLn(4);
    If st.Status <> 0 Then
        System.Diagnostics.Debug.WriteLine(st.Errors);
    Else
        System.Diagnostics.Debug.WriteLine("Value of Gamma function: " + d.ToString());
        System.Diagnostics.Debug.WriteLine("Natural logarithm of Gamma function: " + d0.ToString());
    End If;
End Sub;

After executing the example the console window displays values of gamma function and natural logarithm of gamma function for selected argument.

See also:

IStatistics | Gamma function value