Divides this Fractran number by another by subtracting exponents in their prime factorizations.
The divisor
The quotient if division is exact (no remainder), or null if division is not possible
Checks if this Fractran number equals another by comparing their prime factorizations.
The Fractran number to compare with
True if the numbers are equal, false otherwise
Multiplies this Fractran number with another by combining their prime factorizations.
The Fractran number to multiply with
The product as a new FractranNumber
Private simplifyStatic fromCreates a FractranNumber from a regular number by computing its prime factorization.
The number to convert (must be a positive integer)
The FractranNumber representation with prime factorization
Generated using TypeDoc
A factorized number representation for Fractran computations.
if factors = [ { base: 2, exponent: 3 }, { base: 3, exponent: 1 } ] then the represented number is 2^3 * 3^1 = 8 * 3 = 24
factors = [] means the number is 1