Python  1.0
Namespaces | Functions | Variables
_10_factorize2.py File Reference

Namespaces

 _10_factorize2
 A faster factorization algorithm.
 

Functions

def _10_factorize2.charEncode (f)
 Encodes a character to utf8 in Python 2. More...
 
def _10_factorize2.__translate ()
 Map decimal digits to their utf8 subscript or superscript equivalents. More...
 
def _10_factorize2.isPrime (n)
 Checks if a given integer is prime. More...
 
def _10_factorize2.factorize (n)
 Factorizes an integer or long number. More...
 
def _10_factorize2.exponent (val, type=False)
 Return a superscript for the given digits, such as: More...
 
def _10_factorize2.condense (lst)
 Condenses the list of prime factors of a number, so that each factor appears just once, in the format \(prime^{nth_{power}}\). More...
 
def _10_factorize2.toString (lfactor)
 Stringify a condensed list of factors. More...
 
def _10_factorize2.main (argv=None)
 main function for testing. More...
 

Variables

def _10_factorize2.translate = __translate()
 A closure for mapping decimal digits to their utf8 counterparts. More...
 
 _10_factorize2.cachedPrimes = sieve(47)
 A cache list with the first 15 primes to speed up factorization. More...