Function Math Arithmetic Class

FactorMatrixToExpr

"Factor Matrix To Algebraic Expression" Convert an array of FactorCount elements into a printable string. The FactorCount array represents the prime factors of a number along with the power of each factor.

Signature (Visual Basic / VBA)

Public Function FactorMatrixToExpr( _
    ByRef vFC() As Variant _
    ) As String

Code Example

    Assuming
       Dim avarFactors() As Variant
    for example
       FactorNumberToVariantMatrix(avarFactors(), 12345678) = True
       FactorMatrixToExpr(avarFactors()) = "2*3^2*47*14593"

Parameters

Parameter Description
vFC The two-dimensional dynamic array of variants which contains the prime factors and factor counts. This two-dimensional array represents a table where the first dimension is the column and the second dimension is the row. The prime factors are stored in column #1, rFC(1, X), and the count of that factor is stored in column #2, rFC(2, X), where X represents the sequence of the prime factor within the list of all prime factors.