Public Function FactorNumberToVariantMatrix( _
ByRef rFC() As Variant _
, ByVal vX As Variant _
) As Boolean Assuming
Dim avarFactors() As Variant
for example
FactorNumberToExpr(12345678) = "2*3^2*47*14593"
FactorNumberToVariantMatrix(avarFactors(), 12345678) = True
leaves
LBound(avarFactors, 1) = 0
UBound(avarFactors, 1) = 2
LBound(avarFactors, 2) = 0
UBound(avarFactors, 2) = 4
avarFactors(1, 1) = 2
avarFactors(2, 1) = 1
avarFactors(1, 2) = 3
avarFactors(2, 2) = 2
avarFactors(1, 3) = 47
avarFactors(2, 3) = 1
avarFactors(1, 4) = 14593
avarFactors(2, 4) = 1See also: FactorNumberToExpr Function
FactorMatrixToExpr FunctionrFC: The two-dimensional dynamic array of variants which will be filled with the prime factors of the number vX. 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. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.