Function Math Arithmetic Class

RationalDividend

Return the dividend of the fractional part of the floating-point number vRational. Converts vRational to X+Y/Z (where X, Y, and X are all integers) then returns Y.

Signature (Visual Basic / VBA)

Public Function RationalDividend( _
    ByVal vRational As Variant _
    ) As Variant

Code Example

    RationalDividend(45.75) = 3
    RationalDivisor(45.75) = 4
    RationalNumber(45.75) = 45
    RationalDividend(-45.75) = -3 ' #4
    RationalDivisor(-45.75) = 4
    RationalNumber(-45.75) = -45

Parameters

Parameter Description
vRational Function converts the fractional part of vRational to a fraction (X/Y where X & Y are integers) then returns the dividend (X). Function returns Null if vRational is Null or cannot be fixed up to a number. Note: When vRational is an integer, this function returns a dividend of 0 (zero). Note: When vRational is negative, the dividend returned by this function will be negative as in example #4.