IMath.ModD

Fore Syntax

ModD(Value: Decimal; Divisor: Decimal): Decimal;

Fore.NET Syntax

ModD(Value: decimal; Divisor: decimal): decimal;

Parameters

Value. Dividend.

Divisor. Divisor.

Description

The ModD method returns the remainder from dividing of two decimal high-precision numbers.

Comments

To define numbers of the Decimal type in the array, it is necessary to write the "m" character after the value of each number. For example: 0.001m.

Value of the Divisor parameter cannot be equal to 0.

Fore Example

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

Sub UserProc;
Var
    r: Decimal;
Begin
    r := Math.ModD(83m2.61642151234516451348521m);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the dividend equal to 1.89093311729990008195849.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: decimal;
    Math: MathClass = New MathClass();
Begin
    r := Math.ModD(83m2.61642151234516451348521m);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath