Class Module
47 Members
Math Arithmetic Class
Entisoft Tools 2.0 Object Library · MathArithmetic · 32 Functions · 0 Properties · 14 Subroutines
Declarations
Declarations
Mathematical functions mostly related to arithmetic. These functions perform miscellaneous mathematical operations not included within the MathReals and MathComplex classes. Copyright 1998 Entisoft
Section
ContinuedFraction
Continued Fraction
"Evaluate Continued Fraction" Evaluates the continued fraction illustrated below.
Function
FactorMatrixToExpr
Factor Matrix To Expr
"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.
Function
FactorNumberToExpr
Factor Number To Expr
"Factor Number To Algebraic Expression" Factor a number and return its prime factors in a string as an algebraic expression.
Function
FactorNumberToVariantMatrix
Factor Number To Variant Matrix
Factor a number, filling an array with a list of prime factors and their powers.
Function
Fibonacci
Fibonacci
Return the Nth Fibonacci number as specified in vX. Every Fibnonacci number is the sum of the previous two numbers in the sequence, except for the first two numbers which are both 1 (one). vX must be between 1 and 1476.
Function
FloatToFraction
Float To Fraction
Convert a floating point number into a fractional number represented by a string.
Function
GeneratePi
Generate Pi
One (slow) method for generating Pi. We strongly suggest that you use the Pi property instead of calling this function.
Function
GreatestCommonDivisor
Greatest Common Divisor
Return the largest number equally divisible by both numbers. Also known as GCD and Greatest Common Factor and GCF.
Function
IsPrime
Is Prime
"Is Number Prime" Return true if a number is prime; return False otherwise.
Function
IsWithinPlusOrMinusOf
Is Within Plus Or Minus Of
Return True if vCheck is within plus or minus vVariance of vTarget; return False otherwise. Summary: True if vTarget - vVariance <= vCheck <= vTarget + vVariance.
Function
LeastCommonMultiple
Least Common Multiple
Return the smallest number which is divisible by both arguments vX and vY. Also known as LCM.
Function
NextEven
Next Even
"Next Even Number" Returns the next larger even number.
Function
NextNumber
Next Number
Rounds vX up to the next largest number that is a multiple of vPrecision. vOffset is the start of the sequence of numbers and vPrecision is the step.
Function
NextOdd
Next Odd
"Next Odd Number" Returns the next larger odd number.
Function
NextPrime
Next Prime
"Next Prime Number" Returns the next larger prime number. Returns the smallest prime number greater than the argument.
Function
NextPrimeSample
Next Prime Sample
View VB6 signature, parameters, and usage notes.
Function
NthPrime
Nth Prime
"Nth Number Prime" Return the Nth number in the prime number sequence 2, 3, 5, 7, 11, etc.
Function
NumComp
Num Comp
"Number Compare" or "Numeric Comparison" Determine if one number is less than, equal to, or greater than the other. Returns -1 if A < B; 0 if A = B; 1 if A > B.
Function
PreviousEven
Previous Even
"Previous Even Number" Returns the next smaller even number.
Function
PreviousNumber
Previous Number
Rounds vX down to the next smallest number that is a multiple of vPrecision. vOffset is the start of the sequence of numbers and vPrecision is the step.
Function
PreviousOdd
Previous Odd
"Previous Odd Number" Returns the next smaller odd number.
Function
PreviousPrime
Previous Prime
"Previous Prime Number" Returns the previous, smaller prime number. Returns the largest prime number less than the argument.
Function
PreviousPrimeSample
Previous Prime Sample
View VB6 signature, parameters, and usage notes.
Function
RangeComp
Range Comp
" Range Compare" or " Range Comparison" Determine is X is below, within, or above the range from A through B.
Function
RationalDividend
Rational Dividend
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.
Function
RationalDivisor
Rational Divisor
Return the divisor 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 Z.
Function
RationalNumber
Rational Number
Return the integer part of the floating-point number vRational. Converts vRational to X+Y/Z (where X, Y, and X are all integers) then returns X. Same as calling the Visual Basic Fix function.
Function
RationalToFraction
Rational To Fraction
"Rational Number To Fractional Components" Converts vRational to X+Y/Z (where X, Y, and X are all integers) then returns X, Y, and Z via arguments. Function returns True upon success and False upon failure.
Function
RationalToFractionString
Rational To Fraction String
"Rational Number To Fraction String" Converts vRational to X+Y/Z (where X, Y, and X are all integers) then returns that algebraic expression as a string.
Function
SawtoothWave
Sawtooth Wave
Function whose plotted output resembles the teeth of a saw. Note that this function is offset from the origin.
Function
SquareWave
Square Wave
Function whose output resembles a square wave.
Function
TextPlot
Text Plot
Text plot of a series of X and Y numbers. vNums(1, n) is the X value; vNums(2, n) is the Y value.
Function
NextEvenSample
Next Even Sample
View VB6 signature, parameters, and usage notes.
Sub
NextNumberSample
Next Number Sample
View VB6 signature, parameters, and usage notes.
Sub
NextOddSample
Next Odd Sample
View VB6 signature, parameters, and usage notes.
Sub
PreviousEvenSample
Previous Even Sample
View VB6 signature, parameters, and usage notes.
Sub
PreviousNumberSample
Previous Number Sample
View VB6 signature, parameters, and usage notes.
Sub
PreviousOddSample
Previous Odd Sample
View VB6 signature, parameters, and usage notes.
Sub
SawtoothWaveSample
Sawtooth Wave Sample
View VB6 signature, parameters, and usage notes.
Sub
SquareWaveSample
Square Wave Sample
View VB6 signature, parameters, and usage notes.
Sub
TextPlotAsteriskSample
Text Plot Asterisk Sample
View VB6 signature, parameters, and usage notes.
Sub
TextPlotCosineSample
Text Plot Cosine Sample
View VB6 signature, parameters, and usage notes.
Sub
TextPlotCubicSample
Text Plot Cubic Sample
View VB6 signature, parameters, and usage notes.
Sub
TextPlotQuadraticSample
Text Plot Quadratic Sample
View VB6 signature, parameters, and usage notes.
Sub
TextPlotRandomSample
Text Plot Random Sample
View VB6 signature, parameters, and usage notes.
Sub
TextPlotSineSample
Text Plot Sine Sample
View VB6 signature, parameters, and usage notes.
Sub