TOpenCLValue.Rem Method

TOpenCLValue Rem(TOpenCLValue X, TOpenCLValue Y)

The Reminder after division X/Y.

#NameTypeDescription
1XTOpenCLValuesource TOpenCLValue
2YTOpenCLValuesource TOpenCLValue

Returns: TOpenCLValue

Remarks:

Calculates reminder after division according to formula:

x[i]-y[i]*Trunc(const X[i]/y[i]).

The result will be saved to the calling vector. X and Y must be a real and have the same length. FloatPrecision and Dew.Math.TOpenCLBase.Complex properties of the calling vector are set implicitly to match the X object.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TOpenCLValue a,b,c;
        clMtxVec.CreateIt(out a, out b, out c);
        try
        {
            a.Copy(4);
            b.Copy(3);
            c.Rem(a,b); // c = Rem(4,3)
        }
        finally
        {
            clMtxVec.FreeIt(ref a,ref b,ref c);
        }
    }
}