Function Math Reals Class

ExponentPart

" Exponent Part Of Real Number" Return the exponential part of a real number.

Signature (Visual Basic / VBA)

Public Function ExponentPart( _
    ByVal vX As Variant _
    ) As Variant

Code Example

    ExponentPart(.00123) = -3
    ExponentPart(-.0123) = -2
    ExponentPart(.45) = -1
    ExponentPart(1.2) = 0
    ExponentPart(-1234) = 3
    ExponentPart(12345) = 4
    ExponentPart(1.23E4) = 4

Parameters

Parameter Description
vX Real number whose exponent is returned. Function returns Null if vX is Null or cannot be fixed up to a number.

Notes & Version History

Note The sign of the result depends upon whether vX is less than, equal to, or greater than 1 (one).